nanovna-saver icon indicating copy to clipboard operation
nanovna-saver copied to clipboard

Loading calibration extremely slow when using many segments

Open silbe opened this issue 2 years ago • 5 comments

Describe the bug When using many segments (e.g. ~50) loading the calibration (and probably saving it — don't remember right now) takes over an hour with 100% CPU load even on a reasonably beefy PC. Performing the calibration also takes a long time of 100% CPU load between measurements.

This is probably caused by having each calibration point represented as a separate instance in Python rather than using a single instance and storing the coefficients in a NumPy array.

In the long run it would probably be a good idea to use the calibration classes from scikit-rf instead. That would also make it easier to support additional calibration methods like TRL.

To Reproduce Steps to reproduce the behavior:

  1. Set number of points to 1023.
  2. Set number of segments to 50.
  3. Perform calibration using assistant.
  4. Save calibration.
  5. Load calibration again.

Expected behavior Loading a calibration file with a couple thousand points should only take a few seconds.

Screenshots n/a

Desktop (please complete the following information):

  • OS: Linux
  • Python version: 3.9.2
  • NanoVNA-Saver version: v0.4.0-pre

Additional context See description.

silbe avatar Mar 08 '22 21:03 silbe

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Oct 10 '22 08:10 github-actions[bot]

I've tried this again with current main (commit fb50f4a01b7baf987bc41c2208954a6aaa5f2fdf) and loading large calibration files still takes at least several minutes (didn't wait longer). Please reopen this ticket.

silbe avatar Dec 13 '22 17:12 silbe

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Mar 14 '23 08:03 github-actions[bot]

I don't see any changes in main that I expect to significantly improve calibration loading performance so this should still be applicable.

silbe avatar Mar 14 '23 15:03 silbe

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Jun 14 '23 08:06 github-actions[bot]