NCBI-Hackathons / Metadata_categorization

A crowdsourcing/expert curation platform for metadata categorization.
Creative Commons Zero v1.0 Universal
5 stars 0 forks source link

Editing high-cardinality summary records is slow #23

Open eweitz opened 8 years ago

eweitz commented 8 years ago

In our demo for NLM indexers yesterday, there was a rather long stall when editing a HEK293 summary record that had ~500 individual records. It took about 5 seconds for the edit to save.

Optimize performance so that editing such large summary records takes less than 1 second.

eweitz commented 8 years ago

I just tried editing a few large summary records, and was not able to reproduce the slowness seen on Thursday.

We can re-open this issue if the problem returns.

eweitz commented 8 years ago

Reopening. I couldn't reproduce the bug because of Issue #24. Editing a large summary record -- without having sorted the table -- is indeed slow.

eweitz commented 8 years ago

I've narrowed down on the cause of this slowness, but don't have a fix yet.

slow_editing_performance_analysis

As seen above, Handsontable's _getPathRecursive() method takes up 93% of the ~16 seconds it takes to edit a summary record containing 455 individual records. Avoiding calls to that method might fix this performance issue.

The Handsontable documentation doesn't have much information on the method or its class module; same with Stack Overflow. So fixing this will require getting more familiar with the internals of Handsontable.