Hi everyone!
I find the MSE export time far too long in Pharo. I dug up a little in
the export algo and found two problems. The first one is easy to
improve. The second one less.
First problem: FMRepository>>elements.
This method transform an IdentitySet to an Array with the #asArray
method. This takes ~40% of the export time in a small model (5Mo of Java
sources).
This #elements method is called by the method #includes: of FMRepository
and FMMetaRepository. I propose to change those #includes: methods to
use the variable `elements` instead of the getter. It should not change
anything since the result of an #includes: on an Array and an
IdentitySet should be the same.
Second problem: the progress bar
Usually a progress bar is used via an iteration on a collection and it
update the bar each 200ms. During the export it is not done that way and
the bar is managed "manually" because we do not have one iteration. I
think it is done far more time than each 200ms and at the end ~15-20% of
the export time is spent in the progress bar update. This is far too much.
For now, I don't know how to improve this part without changing the
actual behavior of the export. If I have time I'll try to improve this
part of the export too.
Have a good day.
--
Cyril Ferlicot
https://ferlicot.fr
http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France