Revision 816d498...

Go back to digest for 4th December 2011

Optimization in Office

Sebastian Sauer committed changes in [calligra] /:

Optimize the inverse iterator by making it by a factor of 100 faster.

The inverse iterator logic is used in statistical functions like betainv. Before we parsed and applied a formula >=1000 times for each single iterator call. That is slow^as^hell. This is fixed now by passing in a function-pointer for the formula function that should be used during iteration what obsoletes the expensive^as^hell formula execution done before.

The effect is that documents that made heavy using of formulas using the inverse iterator are now a few hundred factors faster loaded and displayed. This is most notable with the www.inrets.fr%2Ffileadmin%2Fur%2Fma%2FFichiers_mistral%2FPage_Brenac%2FContr-Bf-Aft-Accid-Study2.ods from our collection of test-documents. Before loading that file never finished (cstester aborted with signal 9) while now we have it loaded and displayed in <6 seconds.

File Changes

Modified 3 files
  •   tables/Function.cpp
  •   tables/Function.h
  •   tables/functions/statistical.cpp
3 files changed in total