Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance for big data sets #208

Closed
stefandesu opened this issue Nov 20, 2018 · 8 comments
Closed

Improve performance for big data sets #208

stefandesu opened this issue Nov 20, 2018 · 8 comments
Labels
cleanup code cleanup, refactoring, testing... user experience Usage should be fun and easy

Comments

@stefandesu
Copy link
Member

When working with large systems without hierarchy or after working in the application for a long time without reloading, i.e. every time a lot of items are stored in the Vuex store, there are performance issues that affect the whole application. The cause is likely Vue's reactivity for all the objects stored in Vuex (thousands of objects each with a bunch of properties that all have to be watched by Vue). Right now, the performance penalty is not too big (it's still usable, just a little slow), so this is not the highest priority, but long term we should aim to improve the performance for these cases.

Related: vuejs/vue#4384

@stefandesu stefandesu added user experience Usage should be fun and easy cleanup code cleanup, refactoring, testing... low priority maybe later labels Nov 20, 2018
@stefandesu stefandesu added this to the 2.0.0 milestone Nov 20, 2018
@stefandesu
Copy link
Member Author

stefandesu commented Jan 21, 2019

Performance was already drastically improved by recent refactoring (as a side effect), but certain things still slow down the application. What I noticed in particular is that both selecting and clearing a concept scheme with a large number of top concepts takes a long time. I would guess that it takes that long for Vue to render or remove the thousands of new nodes in ConceptTree. Ideally, ConceptTree would only render the nodes that are currently in view, but this is not a trivial thing to implement (though not impossible of course).

Edit: I was able to confirm this by making ConceptTree just show a subset of all items. In that case, even with vocabularies with 5000 top concepts, the loading times were insignificant.

@stefandesu
Copy link
Member Author

Reopening for #513. Suggestion: Try to improve performance for large data sets by inlining ConceptListItem into ConceptList (because it's only used there).

@stefandesu stefandesu reopened this Nov 8, 2019
@stefandesu stefandesu modified the milestones: 2.0.0, 1.4.0 Nov 8, 2019
@stefandesu stefandesu removed the low priority maybe later label Nov 8, 2019
@stefandesu stefandesu modified the milestones: 1.4.0, 1.3.1 Jan 15, 2020
@stefandesu
Copy link
Member Author

Looking back at this issue, I think the main problem is the big number of Vue components that are created with big datasets. One step would be to inline as many components as possible (where it makes sense of course), as I mentioned in the previous comment. It would also be good to simplify the code of ConceptList and ConceptListItem. If it's possible, it would make sense to turn off certain functionality for items that are not currently visible.

@stefandesu
Copy link
Member Author

If we use vue-virtual-scroller, we can keep using a proper component for ItemName, even in the concept lists, but have only the ones rendered that are actually shown. This should improve performance for long lists significantly.

@stefandesu
Copy link
Member Author

I'm working on getting vue-virtual-scroller to work in Cocoda. Progress is slow because everything's pretty complicated. We will also lose the scrolling animation when a concept is selected (scrolling still works, but just not animated). But when this is properly implemented, we could have VERY long lists without performance issues.

@stefandesu
Copy link
Member Author

I've been having more problems with this and opened an issue in vue-virtual-scroller for something that might not be possible to do (yet). So I'm putting this on hold. Maybe we have to reconsider and find a different solution.

@stefandesu
Copy link
Member Author

Here's a custom virtual scroller implementation that seems to be doing exactly what we need: https://stackoverflow.com/questions/48515997/how-to-handle-vue-2-memory-usage-for-large-data-50-000-objects

Example: https://codepen.io/zupkode/pen/MWwgLyb

@stefandesu stefandesu modified the milestones: 1.3.2, 1.4.0 May 19, 2020
@stefandesu stefandesu removed this from the 1.5.0 milestone Oct 21, 2021
@stefandesu
Copy link
Member Author

With #584, this isn't really an issue anymore and even lists with 50k concepts work fairly well. There's still room for improvement, especially when it comes to reactivity, but that will be a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup code cleanup, refactoring, testing... user experience Usage should be fun and easy
Projects
None yet
Development

No branches or pull requests

2 participants