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

fix: paginate model entries for better performance #5461

Merged
merged 11 commits into from
Nov 14, 2024

Conversation

shawnyama
Copy link
Contributor

@shawnyama shawnyama commented Nov 12, 2024

Description

  • Adding pagination to the model parts is what I settled for saving memory. UI wise I think it's good too since the page can get pretty long
  • Added filters to the Accordion tabs to search within the model parts
  • I tried using tera-toggleable-input to see if not always having an active input box will help out but it didn't make any noticeable difference in memory usage
Screen.Recording.2024-11-13.at.12.22.02.PM.mov

Small cleanups:

  • While adjusting tera-model-part.vue to support showing the filtered items I realized that there was no point in the watcher we have in there
  • Added a scroll to the model equations since that can get huge

Benchmark comparison

  • Models that have 10-20 states typically uses 400 - 500mb in both versions
  • A large model typically uses 1.4 - 1.8GB in this branch, currently in main it uses 2.3 - 3.3GB

Side note:
Adding pagination saved some memory but the model diagram and equations are taking up a lot too, the page will crash if you open the expanded view of this model

Copy link
Member

@YohannParis YohannParis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, and neatily done!

@shawnyama shawnyama requested a review from mwdchang November 13, 2024 20:45
@mwdchang mwdchang merged commit c2cbdc3 into main Nov 14, 2024
4 checks passed
@mwdchang mwdchang deleted the model-page-performance branch November 14, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK]: optimize entries in model page to improve performance
5 participants