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

Store already added node viewer and load it when needed #560

Closed
wants to merge 2 commits into from

Conversation

superstar54
Copy link
Member

In aiidalab-widgets-base/viewer.py, it creates a new viewer every time we select a new AiiDA node, and the viewer is not saved in the app, so we can not reuse it later. This has two drawbacks:

  • The performance is back. user needs to wait every time when selecting a new node.
  • One can not call the viewer later, e.g., for reset.

This PR stores the already added viewer and reuses it later.

@superstar54 superstar54 added this to the v2024.4.0 milestone Nov 20, 2023
@superstar54 superstar54 marked this pull request as draft November 20, 2023 14:00
Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (7549dab) 80.73% compared to head (d7db9ec) 80.50%.

Files Patch % Lines
src/aiidalab_qe/app/result/__init__.py 28.57% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #560      +/-   ##
==========================================
- Coverage   80.73%   80.50%   -0.24%     
==========================================
  Files          49       49              
  Lines        3415     3426      +11     
==========================================
+ Hits         2757     2758       +1     
- Misses        658      668      +10     
Flag Coverage Δ
python-3.10 80.50% <28.57%> (-0.24%) ⬇️
python-3.8 80.54% <28.57%> (-0.24%) ⬇️
python-3.9 80.54% <28.57%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@superstar54 superstar54 marked this pull request as ready for review November 20, 2023 14:01
@unkcpz
Copy link
Member

unkcpz commented Jan 30, 2024

@superstar54 this is ready for review? Can you update the PR.

For the performance, can you give it a benchmark?

@superstar54
Copy link
Member Author

Will create another PR from my forked repo.

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.

2 participants