jhu-bids / TermHub

Web app and CLI tools for working with biomedical terminologies. https://github.com/orgs/jhu-bids/projects/9/views/7
https://bit.ly/termhub
GNU General Public License v3.0
10 stars 10 forks source link

Performance profiling: find bottlenecks #617

Open joeflack4 opened 10 months ago

joeflack4 commented 10 months ago

Overview

We also want to assess: Have we done everything on the frontend to make sure that this issue is not being caused by bugs or addressable performance bottlenecks? If there are significant bugs or bottlenecks, then perhaps solving that will fix the issue and we won't need to do anything else.

Joe's basic idea here is to walk through the debugger and assess how long certain things to run, and how much memory is being used by certain functions / at certain points in time.

There are some Chrome dev tools, but steep initial learning curve.

Progressive enhancement strategy We could do an experiment where we render the comparison page as more or less plain text. Perhaps a JSON representation, or a simple HTML table, with no interactive UI elements or formatting. Then, we could progressively start to add features back 1 at a time, testing each, and see what the performance impact of each is. Things like: expand/collapse concept subtrees, conditional highlighting, the 3 toggle flags (includeMapped, includeDescendants, isExcluded), icons, etc.

We could also do progressive de-hancement. It will be a lot easier to just remove features 1 at a time.

A challenge here is that we want to incorporate this type of testing with the other testing we're doing (e.g. no cache). We want to run our test runner and be able to iterate through difference scenarios, so we want all this experimental code in the same branch. And it could get complicated.

Related

Direct grouping issue:

joeflack4 commented 10 months ago

@Sigfried I will help here and we will pair on this, but I'm dropping myself from 'assign' so that this is on your board but not mine.

Because before we start, I'm wondering if you could get started on your own, maybe consult with chat GPT and find a day with several hours of time where you can research a few options and try 1 out.

joeflack4 commented 7 months ago

As of last DL meeting, we're wondering in particular, for large csets, are the bottlenecks mainly: a. on the frontend? b. on the backend?