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
Making the allocation part of read_tiles single threaded. #2753
Conversation
This pull request has been linked to Shortcut Story #12965: read_tiles/unfiler_tiles: start unfiltering as soon as tiles are ready.. |
47bc9f7
to
92533bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modifications to the Tile
class have the same problem that the Stats
class already has: mixing different lifespan concerns within the same class.
mutex/cv use: *****************------------------------
tile data use: ---------------**************************
One of the effects is simply memory consumption. After tiles are loaded, the mutex/cv remains in memory, not doing anything.
What's really here is a factory class with synchronized construction of Tile
objects. It likely ought to appear as a separate class. Instances of a separate tile factory could also be reused through a resource pool, yield a modest fixed memory overhead and avoid most of the construction costs of factories.
1bf33f0
to
c972f96
Compare
0ff1051
to
0b77fba
Compare
This change allows unfiltering to start as soon as tiles are loaded by VFS. By including a condition variable for each tiles, VFS can signal once it loads an initial batch of tiles. This also adds the vfs.max_batch_read_size setting to specify the maximum size for a batch. --- TYPE: IMPROVEMENT DESC: Read/unfilter tiles: start unfiltering as soon as tiles are ready.
ae9d7de
to
40224a6
Compare
40224a6
to
5433574
Compare
* Read/unfilter tiles: start unfiltering as soon as tiles are ready. This change allows unfiltering to start as soon as tiles are loaded by VFS. By including a condition variable for each tiles, VFS can signal once it loads an initial batch of tiles. This also adds the vfs.max_batch_read_size setting to specify the maximum size for a batch. --- TYPE: IMPROVEMENT DESC: Read/unfilter tiles: start unfiltering as soon as tiles are ready. * Scoping back the change to only a few fixes and making tile generation single threaded.
) * Read/unfilter tiles: start unfiltering as soon as tiles are ready. This change allows unfiltering to start as soon as tiles are loaded by VFS. By including a condition variable for each tiles, VFS can signal once it loads an initial batch of tiles. This also adds the vfs.max_batch_read_size setting to specify the maximum size for a batch. --- TYPE: IMPROVEMENT DESC: Read/unfilter tiles: start unfiltering as soon as tiles are ready. * Scoping back the change to only a few fixes and making tile generation single threaded. Co-authored-by: KiterLuc <67824247+KiterLuc@users.noreply.github.com>
This change reverts the first part of read_tiles to be single threaded. As it is mostly doing memory allocations, it's better to keep it single threaded.
Also including a bug fix when checking the tile allocation size and another to prevent reloading query condition tiles in the sparse unordered with duplicates reader.
TYPE: IMPROVEMENT
DESC: Making the allocation part of read_tiles single threaded.