103 (similar effect in stuttering, though different cause)
Checklist
Author:
[x] One or more reviewers have been assigned.
[x] Automated tests have been included in this pull request, if possible, for the new feature(s) or bug fix.
[x] The associated GitHub issues are included (above).
[x] Notes have been included (below).
Reviewers:
[x] All automated checks are passing (green check next to latest commit).
[x] At least one reviewer has signed off on the pull request. Reviewers have two business days to review the pull request, after which the author may merge in the pull request unilaterally.
Notes
Three main things
Each in separate commit
See commit logs for more details
(1) Set a long timeout for automated tests in case the runner is slow. Should fix GH tasks.
(2) CytoscapeSyncher uses a single doc in the DB. Uploads are deferred by debouncing (currently 3s).
(3) Fix for stuttering when receiving a remote update. To reproduce (on commit 75032c99fe82b58cb9519a4f40a242153b20d36b or earlier):
Load GAL filtered
Open two tabs
Run a layout in tab 1
In tab 2, continuously zoom the network in and out until the remote update for the layout comes in
Note that the UI stutters: It locks up for a bit. Really annoying if you're in the middle of something
Details re. (3), for those interested:
This is why the stuttering is there. The network analyser does a lot of calls to getCount() and that's really slow (over 1s of lockup). It's a lot of O(n) network filter (cy.filter()) queries, and it probably adds up to at least O(n^2) in aggregate.
By caching getCount(), it's a lot faster (< 20 ms). It caches element sets, which is a bit more expensive than it could be (ints). However, it's robust to unbalanced add/remove calls etc. @mikekucera, I'm sure you could optimise this more than I did here, though this seemed like enough for now.
General information
Associated issues:
111
122
123
103 (similar effect in stuttering, though different cause)
Checklist
Author:
Reviewers:
Notes
Details re. (3), for those interested:
This is why the stuttering is there. The network analyser does a lot of calls to
getCount()
and that's really slow (over 1s of lockup). It's a lot of O(n) network filter (cy.filter()
) queries, and it probably adds up to at least O(n^2) in aggregate.By caching
getCount()
, it's a lot faster (< 20 ms). It caches element sets, which is a bit more expensive than it could be (ints). However, it's robust to unbalanced add/remove calls etc. @mikekucera, I'm sure you could optimise this more than I did here, though this seemed like enough for now.