Jump to content

WebDirect: Performance of GoToLayout vs. New (Virtual) Window?


xochi

This topic is 3183 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

 

 

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

  • 5 months later...

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 by James Gill
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 3183 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.