You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it stands, big grids with sparsely placed items will use a lot more memory than they should, as the placement grid is represented as a 2D array, one element per cell, whether or not that cell is filled.
Chrome's implementation uses a LinkedList, and skips past empty regions. It could be used as a model for how ours should work.
The text was updated successfully, but these errors were encountered:
shyndman
changed the title
Migrate placement to use linked lists instead of arrays
Migrate placement grid to use linked lists instead of arrays
Jan 25, 2020
An easier way to reduce memory usage might be to use a Uint8List to represent the placement grid. That way you'll still have an element for every cell, but each element will only be 1 byte each.
As it stands, big grids with sparsely placed items will use a lot more memory than they should, as the placement grid is represented as a 2D array, one element per cell, whether or not that cell is filled.
Chrome's implementation uses a LinkedList, and skips past empty regions. It could be used as a model for how ours should work.
The text was updated successfully, but these errors were encountered: