question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Speed up of Cfmessage

See original GitHub issue

Hi 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 like verifying_time or indexing_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:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
alexamicicommented, Mar 10, 2021

@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.

1reaction
alexamicicommented, Jan 28, 2021

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found