Skip to content

Reusable geometry cache - #22

Open
patrickbr wants to merge 5 commits into
masterfrom
reusable-geometry-cache
Open

Reusable geometry cache#22
patrickbr wants to merge 5 commits into
masterfrom
reusable-geometry-cache

Conversation

@patrickbr

@patrickbr patrickbr commented Aug 7, 2026

Copy link
Copy Markdown
Member

Split the Sweeper into two separate classes:

  • Sweeper, which sweeps
  • GeometryCacheManager, which handles geometry adding to cache, preprocessing, serialization

This is a major refactoring discussed with @ullingerc. The overall goal is to enable Qlever to parse geometries once on index build, and later re-use these parsed and preprocessed geoms during query time.

@patrickbr

Copy link
Copy Markdown
Member Author

First step is done (there is now a GeometryCacheManager). This is already used in the tests and in main() and seems to work without any problems.

Next steps:

1.) also serialize the remaining parts of GeometryCacheManager to disk so that we can easily rebuild it in QLever during query.
2.) Create a SweepEventList class which holds the geom IDs relevant for the join. These may come from multiple cache, and the correct cache is selected by the upper 3 bits of the geometry ID returned from the GeometryCacheManager. Several goals here: enable "local" geometry caches during query execution for user-defined geometries, and allow a build of "local" sweep event lists. We also want the two sides of a join to be in separate event lists, as this enables some speedups in spatialjoin.

During the implementation of the first step I noticed a few smaller things which prevent (2) atm, but I have a few rough ideas how to tackle them.

@patrickbr

Copy link
Copy Markdown
Member Author

Now has a SweeperEventList class, unclear so far where the geometryDuplicateRemoval should now reside in, so disabled atm (which is why the tests are failing)

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.

1 participant