Closed prjemian closed 11 months ago
Time (measured by hand) to connect with http://otz.xray.aps.anl.gov from gemviz client on otz and show first five runs of training catalog:
branch | time, s |
---|---|
183-bug-slow | 5.3 |
main | 5.5 |
Keep looking for the source of delays in the GUI response...
Observation: Used this branch yesterday to plot & show recent 1-D scans for 8-ID XPCS. Response time was reasonable.
During testing today, time to load a catalog was very slow (>30s), time to change page size, time to switch context (bring window to front, bring other application to front) and to change the splitter were all very slow.
With the debugger, found this code makes many requests that show up on the tiled server: https://github.com/BCDA-APS/gemviz/blob/88fc4b114a2aedf9a18d0983ab8d53b6f96f425c/gemviz/bluesky_runs_catalog_table_model.py#L40-L47
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
INFO: 192.168.144.123:63856 - "GET /api/v1/search/training?filter%5Blookup%5D%5Bcondition%5D%5Bkey%5D=d94d2126-fd52-461c-9284-23e5f34b326b&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=ge&filter%5Bcomparison%5D%5Bcondition%5D%5Boperator%5D=le&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bkey%5D=time&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1618203600.0&filter%5Bcomparison%5D%5Bcondition%5D%5Bvalue%5D=1700147812.491687&sort=time HTTP/1.1" 200 OK
These lines are identical.
This line seems to be the root cause of the many requests to the tiled server: https://github.com/BCDA-APS/gemviz/blob/88fc4b114a2aedf9a18d0983ab8d53b6f96f425c/gemviz/tapi.py#L46
It's parent.metadata
that requests.
@rodolakis This is ready for you to test again.
Catalog size is not a problem now. Can browse large catalogs.
You'll see slower paging times for pageSize > 25 (25 runs per page). The first time these runs are displayed in a table, it takes time to get their metadata from the server. For page size of 250, took longer (10-30 seconds, did not time it).
Default page size is now 10. Considering limiting it to 100. Larger than that, use the filtering panel.
Looks good on Mac