Speed up of Cfmessage
See original GitHub issueHi there,
I have a need to process NOAA files for HRRR data and corresponding forecasts but I’m running into issues around speed of reading downloaded files for parsing. It is taking roughly 40 seconds to load data for one location alone. I’ve already managed to make gains with a few other tricks external to the library but when I now run a profiler on the code, about 20% of the overall total execution time of my task is spent inside functions belonging to just CfMessage alone and it is the biggest source of execution delay that isn’t attributed to xarray itself.
I’m very new to the internals of the code here, but at a glance a few areas of potential performance gains may involve:
- Replacing string keys with assigned integer based constants
- The addition of optional de-selection at a higher level of what content is needed from
COMPUTED_KEYS
as options likeverifying_time
orindexing_time
do not have end use utility on my end. - Dropping the
LOG
initialization inside CfMessage as it isn’t called elsewhere in file but still has an initialization overhead - The if-else stack inside build_valid_time function could potentially be replaced with a more divide and conquer approach but this would be a very minor improvement
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
How do I speed up or slow down a message when listening to ...
While listening to a message, use the following speed settings: Pressing the number 4 slows down message ... Pressing the number 6 speeds...
Read more >How to speed up or slow down voice messages - YouTube
WhatsApp playback speed: How to speed up or slow down voice messages. This video also answers some of the queries such as How...
Read more >messages from the stars speed up - YouTube
messages from the stars speed up. 7.5M views 9 months ago. justfarah. justfarah. 19.1K subscribers. Subscribe. 183K. I like this.
Read more >How to Make Your SMS Messages Send Faster - Tatango
In our research, other SMS marketing software providers usually offer a maximum SMS throughput speed of 6,000 MPM. This could either be because ......
Read more >How to Speed Up Voice Notes on WhatsApp - MakeUseOf
Open a chat and hit the play button on a voice message. · Tap the 1x icon to the right of the message...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Snowda FYI we looked into the matter and in our tests you can gain around 15% of performance by not computing the time coordinate that you are not going to use. @aurghs will be working on a PR.
Everything else doesn’t appear to be worth the effort in our benchmarks.
@aurghs: “Replacing string keys with assigned integer based constants” this looks like a very promising performance boost once we enable selecting the data type for keys (that we need to do anyway due to #195) and then fetching the string representation only once like we do with the non-dimensional keys. You may have a look at it once you have time.