-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Optimize GeoHash rendering #2119
Comments
- Reduce redundant Solr requests - Reduce geohash precision when there are too many geohashes to display - Reduce geohash precision when the SpatialFilter query string is too long Relates to #2119
I've improved the performance a little, but I'm still seeing problem num. 1 described above. It seems that faceting is either the cause of or a contributor to the map crashing when zoomed in at the poles. |
- Work around the issue where we request a high precision of geohashes that cover a very large area and cause the browser to crash - Calculate precision from bounding box rather than height - Also add other minor performance improvements to related methods - Implement new methods in SpatialFilter model - New methods not yet implemented in CesiumGeohash layer model Issue: #2119
🎉 Big breakthrough on this issue to share! After encountering many dead ends, I finally found and fixed the source of the problem. The issue was not related to faceting or how we were rendering geohashes. Instead, the problem is tied to trying to perform operations with too many geohashes — something we'd only encounter with a 3D map like Cesium and not with Google Maps. When the camera is heavily tilted, we end up calculating a very low "height" or "altitude." Since we were deciding on a geohash precision level based on a simple mapping of height:precision, we were requesting a high precision of geohashes for these tilted views. The bounding box that we calculated in these views also ends up being large, since the distant background area is still in view. All of this meant that we needed hundreds of thousands of geohashes to cover the extent at the given precision. A similar problem occurs at the poles. Even just obtaining the hashStrings from the nGeohash library using the bounding box and precision was sometimes extremely slow. Then, when we tried to consolidate these hashStrings by replacing complete groups of 32 geohashes with their parent (1 precision level lower), the browser would often crash. To address this issue, I've made these changes, among others:
These changes have been implemented in the Here's what's left to do:
Side note: I think it would cool if one day we could use high precision geohashes in the foreground, and low precision hashes in the background, getting less precise the further they are from camera. This would add a lot of complexity and isn't required for the next release, but it could be a nice feature in the future. |
Other minor fixes and improvements: - Add configurable collection-wide min and max precision values in Geohashes (set max to 9 rather than 6) - Always validate precisions and bounds in methods that use them in Geohashes collection - Account for bounding boxes that cross the antimeridian or have north < south when calculating area - Fix issue where the search results remained in "loading" state when the search was cancelled (e.g. the request URL didn't change, happens when the Cesium camera view has not changed sufficiently) - Decrease limit of number of geohashes in spatial filter to respect Solr's boolean clauses limit - Fix issue where pager was hidden when there were 25-50 results - Remove old CesiumGeohashes view - Remove unused methods from CesiumGeohash model & Geohashes collection Issues: #2119, #1720
📢 The test site has been updated for anyone who would like to try out the latest version: https://test.arcticdata.io/data |
On the
feature-#1720-cesium-data-catalog
branch, geohashes are rendering reasonably quickly now. However there are a couple of remaining issues:The text was updated successfully, but these errors were encountered: