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

ENYO-6473: Enhance ImageItem rendering performance #2777

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

ybsung
Copy link
Contributor

@ybsung ybsung commented May 29, 2020

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

ImageItem rendering time is higher when scrolling in VirtualList.

Resolution

The main root cause is one rendering so many React Elements again. So I tried to cache the React Elements and re-rendered only children prop or some props with a CacheReactElementContext.

Additional Considerations

The CacheReactElementWithPropContext in the CacheReactElementContext is provided because it could be used as a Component. For now there is no place to use it.

Links

ENYO-6473

Comments

Enact-DCO-1.0-Signed-off-by: YB Sung ([email protected])

@codecov
Copy link

codecov bot commented May 29, 2020

Codecov Report

Merging #2777 into develop will decrease coverage by 0.22%.
The diff coverage is 16.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2777      +/-   ##
===========================================
- Coverage    44.54%   44.31%   -0.23%     
===========================================
  Files          161      162       +1     
  Lines         8127     8193      +66     
  Branches      1980     1995      +15     
===========================================
+ Hits          3620     3631      +11     
- Misses        3383     3427      +44     
- Partials      1124     1135      +11     
Impacted Files Coverage Δ
...eactElementDecorator/CacheReactElementDecorator.js 12.69% <12.69%> (ø)
packages/ui/ImageItem/ImageItem.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73fe49e...6f857ad. Read the comment docs.

Enact-DCO-1.0-Signed-off-by: YB Sung ([email protected])
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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