Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

🚀 supercharge tags performance #773

Merged
merged 2 commits into from
Jul 9, 2017

Conversation

kevinansfield
Copy link
Member

@kevinansfield kevinansfield commented Jul 6, 2017

closes TryGhost/Ghost#8540

  • use {{vertical-collection}} in the tags dropdown filter list, opening the dropdown is now virtually instant as it's not attempting to immediately render components for every tag in the list
  • remove pagination/infinite scroll from tags screen
  • load all tags when accessing the tags screen
    • will pause to show spinner if no tags have previously been loaded
    • if tags exist in the ember data store, show the list immediately and load/update list in the background
  • use {{vertical-collection}} to render enough tags to fill the scrollable area with a small buffer and use occlusion and element re-use to swap tags in whilst scrolling (suuuuper fast no matter number of tags loaded)
  • scroll tags into view when they are selected (keyboard nav now makes a lot more sense)
  • tested with 875 tags and 2x/5x CPU throttling with no major slowdowns 🎉

TODO:

  • implement {{vertical-collection}} for the tags dropdown to speed up rendering
  • see if there's a way to scroll to tags that are in the occluded area
    • edge-case, only relevant when accessing the individual tag route directly - everything works at the moment but the active tag isn't scrolled into view
    • may be possible by using tag index and scrolling to calculated height rather than using browser's element.scrollIntoView())

NB: I'm leaving the scroll-to-tag TODO for now, it's a nice-to-have for an edge case and we can re-visit if needed later once the tags screen has been redesigned

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 72.893% when pulling e116697 on kevinansfield:soo-many-tags into a057412 on TryGhost:master.

closes TryGhost/Ghost#8662
- removes `k`, `j`, `up`, `down` shortcuts for changing the active post (these were already mostly unusable in 1.0) and the associated `enter` and `ctrl/cmd+backspace` commands for opening and triggering the delete modal respectively
- removes the `c` shortcut for opening the new post screen
closes TryGhost/Ghost#8540
- use `{{vertical-collection}}` in the tags dropdown filter list, opening the dropdown is now virtually instant as it's not attempting to immediately render components for every tag in the list
- remove pagination/infinite scroll from tags screen
- load all tags when accessing the tags screen
  - will pause to show spinner if no tags have previously been loaded
  - if tags exist in the ember data store, show the list immediately and load/update list in the background
- use `{{vertical-collection}}` to render enough tags to fill the scrollable area with a small buffer and use occlusion and element re-use to swap tags in whilst scrolling (suuuuper fast no matter number of tags loaded)
- scroll tags into view when they are selected (keyboard nav now makes a lot more sense)
- tested with 875 tags and 2x/5x CPU throttling with no major slowdowns 🎉
@kevinansfield kevinansfield changed the title [WIP] 🚀 supercharge tags performance 🚀 supercharge tags performance Jul 7, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 73.224% when pulling e7b378e on kevinansfield:soo-many-tags into a057412 on TryGhost:master.

Copy link
Contributor

@kirrg001 kirrg001 left a comment

Choose a reason for hiding this comment

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

👍

@kirrg001 kirrg001 merged commit 37dd638 into TryGhost:master Jul 9, 2017
@kirrg001
Copy link
Contributor

kirrg001 commented Jul 9, 2017

When i run grunt dev i see now:

===================================================================
	Vertical Collection
	:: Including CSS for Visual Debugger
	:: (included in non production builds only)
	:: To use, set {{#vertical-collection debug=true}}
	:: To debug your applied CSS rules, set {{#vertical-collection debugCSS=true}}
===================================================================

@kevinansfield kevinansfield deleted the soo-many-tags branch February 20, 2018 11:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance with many tags
3 participants