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.

Parsing performance

See original GitHub issue

I seem to be getting slow results when parsing.

Midi file with 14,000 events:

GetTempoMap() = 140-270ms GetNotes() = 200-300ms GetTimedEvents() + TimeAs() = 180-322ms

foreach (TimedEvent e in midi.GetTimedEvents())
        {                           
              realtime =  e.TimeAs<MetricTimeSpan>(tempoMap).TotalMicroseconds / 1000000f                
        }

Running on Unity + i7 3770.

Any thoughts?

midi file: midi.zip

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:28 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
melanchallcommented, Feb 8, 2020

I’ve made small changes, benchmarks show smaller times. Please take the latest version and test on your files.

1reaction
melanchallcommented, Feb 4, 2020

I have an idea about what can be changed in channel events reading. I’ll try and let you know if it give any performance boost.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance - Parsing
Performance is particularly important for parsing because you will often need to parse megabytes, or potentially gigabytes, of data.
Read more >
Optimizing Parser Performance
When designing and implementing DSLs, performance is often an afterthought. However, once your DSL moves into production and users start to ...
Read more >
Parsing and message flow performance
Parsing is the means of populating and serializing the message tree from the data, and it can occur whenever the message body is...
Read more >
Implementing High Performance Parsers in Java - InfoQ
A normal design for parsers is to separate the parsing into two steps. The first step breaks the data into cohesive tokens, where...
Read more >
High-performance JSON parsing in Go
This blog post is an exploration of JSON parser performance, and, ultimately, a description of the high-performance JSON parser used in ...
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