Import performance improvements1 min read

Sometimes I think developers should use netbooks as their testing machines. Then they would be hit by performance bottlenecks in much more obvious ways 🙂
This morning, Ed pushed a commit that limits the thumbnail size to 96×96 (previously unlimited) in PiTiVi’s master branch. What this means is that previously, each time you imported a clip into your project, PiTiVi was creating a full-resolution PNG image and storing it into /tmp. Not a good idea. Especially if you work with 720P HD files like me.
So, I had noticed the phenomenon but never reported it thinking it was on purpose. Turns out it was not. Now, I did some benchmarking for Edward before and after his commits, and here are my results.
The benchmark is importing 74 clips (720P H.264 in a .mov container), measured with my stopwatch.
On a Dell Mini 9 netbook with an Atom N270 processor:

  • before: 1 minute, 42 seconds
  • after: 56 seconds

On a Dell Inspiron 530n with a Core2 Quad Q9300:

  • before: 41 seconds
  • after: 16 seconds

This is certainly not the only performance problem in PiTiVi at the moment. Anyone experienced in profiling should take a look PiTiVi and report problems. I would personally be very interested if audio waveforms could be generated much faster.