scf() is 20x slower in 5.5.2 and 6.0 than in 5.3.0. Since 5.5.0, it takes 10s to open the 20th figure
@sgougeon)
Reported by Samuel GOUGEON (BUG DESCRIPTION:
----------------
Posted with figures on https://www.mail-archive.com/users@lists.scilab.org/msg05885.html
Opening a new empty figure (without drawing anything) is a so common elementary task and it has
become so long that i have built a short benchmark about it from Scilab 4.1.2 to Scilab 6.0.
Detailed results are here-below. The main conclusions are the following:
with no pre-existing figure, scf() is 20 times slower in 5.5 and 6.0 than in its best performances
in 5.3.0. On my computer, it takes 0.062 s with 5.3.0 and 1.3 s now (5.5.2|6.0).
Scilab 5.4.0, 5.4.1 and 5.5.0 have dramatically damaged performances.
The loss is even 10x bigger with figure(): it is ~200 times slower with Scilab 5.5 & 6.0 than with
Scilab 4.1.2
Since Scilab 5.5.0, the time taken to open a new figure increases linearly with the number of
already opened figures. On my computer, opening the first one (after loading scf()) takes 1.8 s,
and opening the 20th one takes almost 10 s. This is still the case with Scilab 6.0.
Detailled results:
Opening the first figure :
------------------------
Only 2 tests are reported with figure() instead of scf().
t=0; for i=1:50, tic(); scf(); t=t+toc(); xdel(); end; t, t/50
[s] [s] 4.1.2 base figure()
6.0.0 : 62.39/50 1.248 18.5 2.32
5.5.2 : 73.62/50 1.4723 21.8
5.5.0 : 69.94/50 1.3988 20.8
5.4.1 : 37.33/50 0.7466 11.1
5.4.0 : 24.07/50 0.4814 7.14
5.3.0 : 3.102/50 0.0620 0.92
5.1.0 : 4.069/50 0.0814 1.21
4.1.2 : 3.370/50 0.0674 1.00 0.014
Opening 20 figures :
------------------
t=[]; for i=1:20, tic(); scf(); t(i)=toc(); end; sum(t)/20
6.0.0 : 5.30 [1.35 => 9.51]
5.5.2 : 5.68 [1.77 => 9.92]
5.5.0 : 5.66 [1.82 => 9.85] range from the #1 to #20
5.4.1 : 1.18
5.4.0 : 0.923
5.3.0 : 0.110
5.1.0 :
4.1.2 : 0.0774
See graphs on https://www.mail-archive.com/users@lists.scilab.org/msg05885.html
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
t=0; for i=1:50, tic(); scf(); t=t+toc(); xdel(); end; t, t/50
t=[]; for i=1:20, tic(); scf(); t(i)=toc(); end; sum(t)/20
plot(t)
OTHER INFORMATION:
------------------
Edited by Vincent COUVERT