Skip to content
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

Repeated URI parsing slows 3D Tiles performance #11197

Closed
jjhembd opened this issue Mar 29, 2023 · 0 comments · Fixed by #11202
Closed

Repeated URI parsing slows 3D Tiles performance #11197

jjhembd opened this issue Mar 29, 2023 · 0 comments · Fixed by #11202

Comments

@jjhembd
Copy link
Contributor

jjhembd commented Mar 29, 2023

In large tilesets, especially where many tiles are pointing to external tilesets, URI parsing can add a significant overhead to tile loading. Profiling on one of these tilesets shows more than 20% of JavaScript time being used by URI.parse and related functions.

There are two things we could do to improve:

  • Store a parsed URI in the Resource class, so that frequently-used prototype methods like .clone, .getUrlComponent and .getDerivedResource don't have to re-parse it from a string every time.
  • Add a .serverKey property to the Request constructor. This would reduce calls to RequestScheduler.getServerKey , which parses a URI from a string. Note: this property is already assumed in Cesium3DTile, where requestSingleContent sends a serverKey to the constructor—but the constructor doesn't use it.

Related: #11168. Ideally, any changes should be written in a way that will be easy to convert to native URL and URLSearchParams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant