-
Notifications
You must be signed in to change notification settings - Fork 80
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
All Time Zones #1580
All Time Zones #1580
Conversation
Map them just to the string json value. Storing codes adds ~881284b to the heap. dh-core.js is 2.2mb
Adds ~1MB to the heap
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.
Any noticable impact on performance when this is first used? Maybe try a profiling run and confirm it doesn't cost much?
web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsTimeZone.java
Outdated
Show resolved
Hide resolved
For profiling I ran with timers on the API page after startup:
It took ~10-20ms to initialize all the time zones. |
web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsTimeZone.java
Outdated
Show resolved
Hide resolved
web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsTimeZone.java
Outdated
Show resolved
Hide resolved
- Map from String directly to JsTimeZone - Map some short forms to the existing TZs already in the map
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.
Two thoughts, these aren't strong opinions, either ship as is or fix and then i'll reapprove.
web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsTimeZone.java
Outdated
Show resolved
Hide resolved
web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsTimeZone.java
Show resolved
Hide resolved
- Use static initializer block to initialize the time zones instead - Remove unnecessary private method
Alternative to #1577 , recognizes more time zones correctly.
Tested by navigating to http://localhost:10000/jsapi/table_basic.html and testing with the script below - of the 592 time zones, only 171 were unrecognized (compared to 245 unrecognized of the timezone lookup method, and 562 unrecognized of the current main line).