-
Notifications
You must be signed in to change notification settings - Fork 49
Render on visible for better performance #101
Conversation
@t9md I checked out your branch and linked your atom-select-list branch. It works well, and the timeline tab definitely shows it to be faster in loading the command palette (<100ms vs 250ms). Nice work! I think the behaviors you mentioned would be more appropriately tested in atom/atom-select-list#22. |
@leroix Thanks you for feedback. |
e5f622f
to
8ed4e74
Compare
@t9md is this PR ready to be merged? |
Yes |
@t9md I was wondering if you think this will be useful to implement in all other Atom core packages that use atom-select-list? |
Not sure if it's always good to introduce this new render-on-visible feature. |
Description of the Change
[Updated]
Aiming to solve #80
Depends on atom/atom-select-list#22
This PR use new atom select-list's
initiallyVisibleItemCount
(not merged yet) option.When this option was passed, new
visible
option passed toelementForItem
reflect visibility state in viewport.We can use this information to skip heavy computation for faster response.
Here I just return empty
li
element when invisible.Here is behavioral changes in
command-palette
.li
.Alternate Designs
#81
#98
#97
Benefits
Performance improve.
command-palette launch faster.
Perf comparison is at atom/atom-select-list#22.
Plus, user can easily notice perf improvement especially for initial launch, and user have many commands(like installing
vim-mode-plus
ornuculide
).Possible Drawbacks
When mouse scroll very quickly, user can see blank fake item.
Applicable Issues
#80