Skip to content

Conversation

nithinp7
Copy link
Contributor

Addresses #566

This PR adds support for client-driven "derived content" caching. This augments our current cache system, which emulates a typical browser cache by saving network response data for tiles and other resources. The new system optionally permits clients (e.g., Cesium for Unreal) to serialize renderer-specific content derived from the original tile data (e.g., decoded geometry / textures, cooked physics meshes, etc.) and give it back to Cesium Native for caching. The derived content is cached with the original request url as the key. Later, when we need a tile that is already in cache, we can skip almost all of the loading process (both Cesium Native's loading and part of the client-side loading).

Primary changes:

  • Added a TileContentCache which wraps an asset accessor to cache and read loaded tile content.
  • Added semantics in the asset request interfaces to represent caching. Added option to configure write-through vs write-back mode when using an asset accessor - this is useful to be able to cache derived results later instead of caching the originally requested asset directly.

A few optimizations / fixes to our sqlite caching were made along the way:

  • Fixed an issue causing the WAL file to only rarely be written back to the DB. This was due to sqlite statements being "reset" in the wrong order, partially locking the DB and causing autocheckpointing to almost always fail. This fix improves the disk cache performance, which is especially important now that we are writing and reading much heavier bulk data into and out of the cache.
  • Added a dedicated thread pool for sqlite reading (current default size is 5). Previously all sqlite reads and writes happened on a single thread.

Probably other things I'm missing! Will add more details soon including some numbers, just wanted to open this for visibility / early-feedback!

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

12 similar comments
@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@cesium-concierge
Copy link

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@csciguy8
Copy link
Contributor

Closing this PR due to its age and inactivity.

It's linked against an issue, and that issue is linked against a bigger performance roadmap issue, so if we need to continue this work, we can always find it and reopen it.

@csciguy8 csciguy8 closed this Apr 17, 2024
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