-
Notifications
You must be signed in to change notification settings - Fork 1
Performance Tests
I have created a performance test today using Visual Studio 2015. First I opened a file in EDF Browser, opened up the Power Spectrum, and set it to play real-time (Ctrl+Space) for 1.5 minutes. I had to use the Debug build (which is not advised) because I wanted to see the Qt methods in the result-graph.
The report showed that EDF Browser never uses more than one core (max CPU is 25%), and the following methods are the most CPU-intense:
- 37.9% ViewCurve::paintEvent
- 16.3% SingalCurve::paintEvent
- 5.6% UI_SpectrumDockWindow::calculateFFT
- 3.3% UI_SpectrumDockWindow::compileSignalFromRawData
Conclusions:
- The waveform view (ViewCurve) draws too many lines and in an ineffective way. The typical user doesn't need to see all tiny waveform segments, so that should be optimized.
- FFT calculation speed is not an issue right now
- Multi-threading would be nice, but only one thread should draw the UI anyway, so until it's not significantly faster, we don't need it.
- UI drawing methods should limit framerate (to 50 fps?) to spare CPU power
As the report shows there is a serious memory leak in the current version. The memory usage went up from 190 megabytes to 875 megabytes in just 60 seconds. After taking a few snapshots, it is likely that the Power Spectrum's Vector is the cause of the leak. We should always delete that structure after use or we could even reuse it.