Load time of a window

Is it possible to time how long it takes a window to fully load, from opening the window to all resources are loaded?

Not really. You could log a precision timestamp just before running system.nav.openWindow(), manually attach a propertyChange listener on the root container that looks for componentRunning == True, and print that precision timestamp. But bindings on all of your resources are asynchronous – you’d have to track the propertyChanges when the various bindings update, too. There wouldn’t really be any “Done” signal for the bindings, especially since many will fire multiple times as dependencies change.

Ok. What about perhaps running a time stamp on the open of the window like you said and getting the end time stamp inside a system.util.invokeLater, doesn’t that wait for all other pending things to finish up? I’m not exactly sure on how invokeLater works under the hood I don’t know if that is a reasonable route.

invokeLater() won’t wait for all of the bindings, just current running visual updates and other queued functions. Many bindings are synchronous, so those would finish, but queries and tags update later, generally when the data arrives from the gateway. Anything dependent on the queries or tags would re-update after them.

1 Like