hubmapconsortium / entity-api

A set of web service calls to return information about HuBMAP entities
https://entity.api.hubmapconsortium.org
MIT License
3 stars 1 forks source link

Find out why the profiling only captured one trigger method #641

Closed yuanzhou closed 3 months ago

yuanzhou commented 3 months ago

Based on the entity-api profiling generated result entity_stats.prof.txt (remove the .txt extension to run with SnakeViz), there's only one schema trigger method found. This seems to be very strange when a Publication node is connected to 200 Datasets.

Screenshot 2024-03-12 at 9 08 10 PM

Find out why the profiling didn't capture other trigger methods. Hint: no need to reindex, just make a GET call against the Publication node or one of the direct ancestor Dataset node and generate another profiling result to compare.

DerekFurstPitt commented 3 months ago

entity_stats.prof.zip @yuanzhou This is the run of the profiler in entity that captures a dataset (rather than a sample) so multiple read triggers are run.

Worth noting, in contrast to profiling an entity api call for a sample, the percentage of time occupied by calling uuid-api's get_hubmap_ids is comparatively low. It only appeared so high in the sample run because, since fewer triggers are run, the generate_triggered_data took up less time, so proportionally, the uuid api call took more time.