February 17, 201510 yr In my WebDirect solution, I often do something like this for creating data in a non-related table. I'm curious if anyone knows which method is faster? Creating then closing a new (virtual) window: FreezeWindow New Window Go to layout XXX New Record Set field Set field Close Window Navigating layouts: FreezeWindow Go to layout XXX New Record Set field Set field Go to layout (original layout) The reason I prefer the New Window solution is that it doesn't affect the state of the current window. The second solution, by contrast, can affect things such as the layout mode, selected field or portal row, portal scroll position, etc.
February 17, 201510 yr Spawning a new window carries a bigger penalty. Especially if you do it in a loop. For just a one-off it shouldn't matter much.
February 18, 201510 yr You may also want to check to see whether creating a new window also opens a new, additional concurrent connections. Steven
February 18, 201510 yr Author Thanks for the input. This also may be a case where using "Perform Script on Server" might be useful as a way to get the processing load out of the WebDirect space, especially if "Wait for completion" is false. At least one of my scripts is just doing simple Logging of debug and status messages, so it's fine if it runs asynchronously...
August 4, 201510 yr Did you ever determine if virtual windows consume a concurrent connection? My guess is no because they are opened in the same browser window, but I don't like guessing on these types of things. Inquiring minds want to know!
August 4, 201510 yr Thanks for the input. This also may be a case where using "Perform Script on Server" might be useful as a way to get the processing load out of the WebDirect space, especially if "Wait for completion" is false. At least one of my scripts is just doing simple Logging of debug and status messages, so it's fine if it runs asynchronously... PSOS is probably ok if you're handing off a process that can continue without waiting for a confirmation that something was completed, but I'd imagine that the overhead of calling PSOS multiple times for a relatively simple script would be saved by performing it in the client. Remember that each PSOS instance is using a dedicated thread of the available CPU until it finishes, so calling many instances of PSOS in a short period of time can cause a fairly major performance hit if you run out of available threads. Edited August 4, 201510 yr by James Gill
August 4, 201510 yr If you are just creating a new record, there is no need to leave the layout or context the user is currently in. Like Wim said, for one-off processes, there isn't likely a lot of difference. But in a loop or series of record creation, it can be a hard hit. Also, what if your script fails while the window is still open...the user could be left in an unfamiliar place.
August 7, 201510 yr Just to keep everyone in the loop, I have confirmed that virtual WebDirect windows do NOT count against the concurrent connection limit.
Create an account or sign in to comment