Skip to content

Conversation

@willmcgugan
Copy link
Member

@willmcgugan willmcgugan commented Dec 26, 2022

  • Introduces a new Strip primitive which represents a line worth of segments.
  • Added hits and misses attributes to LRUCache
  • Fixed issue where scroll views were refreshed unnecessarily
  • Added textual._cache.FIFOCache
  • Removed thread locks from caches

Because Strip is immutable this allows for caching that wouldn't otherwise have been possible. Not all these optimizations have been fully realized yet

@willmcgugan willmcgugan marked this pull request as draft December 26, 2022 18:07
@willmcgugan willmcgugan changed the title adds Strip primitive WIP adds Strip primitive Dec 26, 2022
@willmcgugan willmcgugan changed the title WIP adds Strip primitive adds Strip primitive Dec 27, 2022
@willmcgugan willmcgugan marked this pull request as ready for review December 27, 2022 13:10
self._head = []
self._cache.clear()
self._full = False
self._head = []

Choose a reason for hiding this comment

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

Should it also clear hits and misses counts?

Copy link
Member Author

Choose a reason for hiding this comment

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

The hits and misses are a debugging aid to see how well the cache is performing. You generally want to know about past performance even when it is cleared.

@willmcgugan
Copy link
Member Author

@darrenburns @davep @rodrigogiraoserrao Merging this. You might want to do a retroactive review at some point.

#executivedecision

@willmcgugan willmcgugan merged commit 34f86f4 into main Dec 30, 2022
@willmcgugan willmcgugan deleted the strip-optimization branch December 30, 2022 09:40
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.

3 participants