It is interesting to see how during development we are moving back and forth between ‘better job of suggesting’ to ‘faster suggesting’. A cycle seems to last around two weeks. Currently we are inpart of it. Just yesterday Tomaz had a breakthrough getting one component that took 10 seconds per request (the biggest time spender) to just under one second.
The interesting thing is that we were on the verge of falling into premature optimization trap. We’ve moved the most time-critical part of the code from to C, which at first didn’t seem to help much. And we’ve almost went for moving even more code to C, but in a of doubt I’ve fired up amazing oprofile profiler.
Profiling showed that we spend most of the time in an inner loop measuring the length of strings by wcslen() which is called from the Boost library that we use. Now we are back on track with our performance.