Re: [Scilab-users] xdel replaced by close()

2022-01-21 Thread Samuel Gougeon

Hello Claus,

Le 21/01/2022 à 20:58, Claus Futtrup a écrit :

Hi Scilabers

Today I tried to replace xdel(winsid()) in one of my scripts with 
close(winsid()) because Scilab shows a warning in the console:


Warning: Feature xdel(...) is obsolete and will be permanently removed 
in Scilab 6.2


Warning: Please use close(...) instead.

I am negatively surprised that the close() command takes a long time 
to execute with 5-10 windows open (a few seconds per window). The 
xdel() command can do it in a split second.




The issue comes not from close() but from the change offindobj() that it 
calls , noticeably 
to perform findobj("figure_id",id) in 6.1.1.
It does not impact only  close() for 
this case, that was processed as a special accelerated case 
 
in the former findobj().


This downgradingwas reported 
 7 months before 
releasing 6.1.1, and knowingly ignored, while it is perfectly fixable by 
restoring the fast special case.





What is the motivation for replacing xdel with close?


Both do the same thing. Scilab does not need duplicates.

Regards
Samuel
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] xdel replaced by close()

2022-01-22 Thread Stefan Du Rietz

Hello,

On 2022-01-21 23:54, Samuel Gougeon wrote:

Hello Claus,

Le 21/01/2022 à 20:58, Claus Futtrup a écrit :

Hi Scilabers

Today I tried to replace xdel(winsid()) in one of my scripts with 
close(winsid()) because Scilab shows a warning in the console:


Warning: Feature xdel(...) is obsolete and will be permanently removed 
in Scilab 6.2


Warning: Please use close(...) instead.

I am negatively surprised that the close() command takes a long time 
to execute with 5-10 windows open (a few seconds per window). The 
xdel() command can do it in a split second.




The issue comes not from close() but from the change offindobj() that it 
calls , noticeably 
to perform findobj("figure_id",id) in 6.1.1.
It does not impact only  close() for 
this case, that was processed as a special accelerated case 
 
in the former findobj().


This downgradingwas reported 
 7 months before 
releasing 6.1.1, and knowingly ignored, while it is perfectly fixable by 
restoring the fast special case.





What is the motivation for replacing xdel with close?


Both do the same thing. Scilab does not need duplicates.

Regards
Samuel



scf(id) is much faster than findobj("figure_id",id)

--> winsid()
 ans  =
   0.   1.

--> tic, f = []; for k=winsid(), f = [findobj("figure_id",k); f]; end, toc
 ans  =
   0.281087

--> tic, f = []; for k=winsid(), f = [scf(k); f]; end, toc
 ans  =
   0.000237

So, this is how to do it:

--> for k=winsid(), delete(scf(k)); end

Regards
Stefan
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] xdel replaced by close()

2022-01-22 Thread Stéphane Mottelet
Hi,

This is fixed for the next release:

https://codereview.scilab.org/#/c/21803/

In the meantime, if you really need it you can download the patched version of 
findobj.

S.

> Le 21 janv. 2022 à 23:54, Samuel Gougeon  a écrit :
> 
> 
> Hello Claus,
> 
>> Le 21/01/2022 à 20:58, Claus Futtrup a écrit :
>> Hi Scilabers 
>> 
>> Today I tried to replace xdel(winsid()) in one of my scripts with 
>> close(winsid()) because Scilab shows a warning in the console: 
>> 
>> Warning: Feature xdel(...) is obsolete and will be permanently removed in 
>> Scilab 6.2 
>> 
>> Warning: Please use close(...) instead. 
>> 
>> I am negatively surprised that the close() command takes a long time to 
>> execute with 5-10 windows open (a few seconds per window). The xdel() 
>> command can do it in a split second. 
>> 
> 
> The issue comes not from close() but from the change of findobj() that it 
> calls, noticeably to perform findobj("figure_id",id) in 6.1.1.
> It does not impact only close() for this case, that was processed as a 
> special accelerated case in the former findobj().
> This downgrading was reported 7 months before releasing 6.1.1, and knowingly 
> ignored, while it is perfectly fixable by restoring the fast special case.
> 
> 
>> 
>> What is the motivation for replacing xdel with close? 
> 
> Both do the same thing. Scilab does not need duplicates.
> 
> Regards
> Samuel
> 
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] xdel replaced by close()

2022-01-22 Thread Claus Futtrup

Hi Stephane

Good news, thank you.
Thank you to the other list members for the other responses as well.

Best regards,
Claus

On 22-01-2022 14:24, Stéphane Mottelet wrote:

Hi,

This is fixed for the next release:

https://codereview.scilab.org/#/c/21803/

In the meantime, if you really need it you can download the patched 
version of findobj.


S.


Le 21 janv. 2022 à 23:54, Samuel Gougeon  a écrit :


Hello Claus,

Le 21/01/2022 à 20:58, Claus Futtrup a écrit :

Hi Scilabers

Today I tried to replace xdel(winsid()) in one of my scripts with 
close(winsid()) because Scilab shows a warning in the console:


Warning: Feature xdel(...) is obsolete and will be permanently 
removed in Scilab 6.2


Warning: Please use close(...) instead.

I am negatively surprised that the close() command takes a long time 
to execute with 5-10 windows open (a few seconds per window). The 
xdel() command can do it in a split second.




The issue comes not from close() but from the change offindobj() that 
it calls , 
noticeably to perform findobj("figure_id",id) in 6.1.1.
It does not impact only  close() 
for this case, that was processed as a special accelerated case 
 
in the former findobj().


This downgradingwas reported 
 7 months before 
releasing 6.1.1, and knowingly ignored, while it is perfectly fixable 
by restoring the fast special case.





What is the motivation for replacing xdel with close?


Both do the same thing. Scilab does not need duplicates.

Regards
Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] xdel replaced by close()

2022-01-22 Thread Stephane Mottelet



However, the findobj() fix that has been recently merged by Clément 
restores only the speed of tags search. findbobj()  won't be further 
fixed as it provides many useful features which were missing to its 
(fast but poor) previous version.


Indeed, using findobj to get the handle of a figure knowing its id is 
the most complicated that one can imagine. It sounds to me like the 
affirmation: « why make it simple when it can be made complicated »... I 
mean, close() has to be fixed to use scf() as proposed in this thread.


Sometimes adding useful and needed features can degrade the speed of a 
function (you can't make an omelette without breaking eggs).  Finding 
handles given their tag has its original performance with this patch. 
But I repeat that h=findobj('figure_id",id) should be avoided in favour 
of h=scf(id), until findobj() is completely rewritten in C++ (which is 
planned).


Moreover nobody was complaining about xdel() and making it deprecated 
was never discussed by the community. Many people don't use Scilab any 
more because it misses features. So Scilab needs features, not 
absurde/arbitrary cleaning . A word to the wise...


S.

Le 2022-01-22 14:24, Stéphane Mottelet a écrit :


Hi,

This is fixed for the next release:

https://codereview.scilab.org/#/c/21803/ [1]

In the meantime, if you really need it you can download the patched 
version of findobj.


S.


Le 21 janv. 2022 à 23:54, Samuel Gougeon  a écrit :


Hello Claus,

Le 21/01/2022 à 20:58, Claus Futtrup a écrit : Hi Scilabers

Today I tried to replace xdel(winsid()) in one of my scripts with 
close(winsid()) because Scilab shows a warning in the console:


Warning: Feature xdel(...) is obsolete and will be permanently removed 
in Scilab 6.2


Warning: Please use close(...) instead.

I am negatively surprised that the close() command takes a long time to 
execute with 5-10 windows open (a few seconds per window). The xdel() 
command can do it in a split second.


The issue comes not from close() but from the change of findobj() that 
it calls [2], noticeably to perform findobj("figure_id",id) in 6.1.1.
It does not impact only [3] close() for this case, that was processed 
as a special accelerated case [4] in the former findobj().
This downgrading was reported [5] 7 months before releasing 6.1.1, and 
knowingly ignored, while it is perfectly fixable by restoring the fast 
special case.


What is the motivation for replacing xdel with close?
Both do the same thing. Scilab does not need duplicates.

Regards
Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/v3?i=SGI0YVJGNmxZNE90Z2thMFYLWSxJOfIERJocpmb73Vs&r=SW5LV3JodE9QZkRVZ3JEYbCxfBpXCzNXFJI9eyEBCB_E8EQzXar_oWBGCSukLx6I&f=bnJjU3hQT3pQSmNQZVE3aPQ56ZBjot0Lu_H1dlHvp1727w_z78BVJc295PQlt99Z&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=dFBm

Links:
--
[1] 
https://antispam.utc.fr/proxy/v3?i=SGI0YVJGNmxZNE90Z2thMFYLWSxJOfIERJocpmb73Vs&r=SW5LV3JodE9QZkRVZ3JEYbCxfBpXCzNXFJI9eyEBCB_E8EQzXar_oWBGCSukLx6I&f=bnJjU3hQT3pQSmNQZVE3aPQ56ZBjot0Lu_H1dlHvp1727w_z78BVJc295PQlt99Z&u=https%3A//codereview.scilab.org/%23/c/21803/&k=dFBm
[2] 
https://antispam.utc.fr/proxy/v3?i=SGI0YVJGNmxZNE90Z2thMFYLWSxJOfIERJocpmb73Vs&r=SW5LV3JodE9QZkRVZ3JEYbCxfBpXCzNXFJI9eyEBCB_E8EQzXar_oWBGCSukLx6I&f=bnJjU3hQT3pQSmNQZVE3aPQ56ZBjot0Lu_H1dlHvp1727w_z78BVJc295PQlt99Z&u=http%3A//bugzilla.scilab.org/show_bug.cgi%3Fid%3D13738%23c4&k=dFBm
[3] 
https://antispam.utc.fr/proxy/v3?i=SGI0YVJGNmxZNE90Z2thMFYLWSxJOfIERJocpmb73Vs&r=SW5LV3JodE9QZkRVZ3JEYbCxfBpXCzNXFJI9eyEBCB_E8EQzXar_oWBGCSukLx6I&f=bnJjU3hQT3pQSmNQZVE3aPQ56ZBjot0Lu_H1dlHvp1727w_z78BVJc295PQlt99Z&u=http%3A//bugzilla.scilab.org/16734&k=dFBm
[4] 
https://antispam.utc.fr/proxy/v3?i=SGI0YVJGNmxZNE90Z2thMFYLWSxJOfIERJocpmb73Vs&r=SW5LV3JodE9QZkRVZ3JEYbCxfBpXCzNXFJI9eyEBCB_E8EQzXar_oWBGCSukLx6I&f=bnJjU3hQT3pQSmNQZVE3aPQ56ZBjot0Lu_H1dlHvp1727w_z78BVJc295PQlt99Z&u=https%3A//codereview.scilab.org/%23/c/20953/6/scilab/modules/gui/macros/findobj.sci&k=dFBm
[5] 
https://antispam.utc.fr/proxy/v3?i=SGI0YVJGNmxZNE90Z2thMFYLWSxJOfIERJocpmb73Vs&r=SW5LV3JodE9QZkRVZ3JEYbCxfBpXCzNXFJI9eyEBCB_E8EQzXar_oWBGCSukLx6I&f=bnJjU3hQT3pQSmNQZVE3aPQ56ZBjot0Lu_H1dlHvp1727w_z78BVJc295PQlt99Z&u=http%3A//bugzilla.scilab.org/show_bug.cgi%3Fid%3D7117%23c6&k=dFBm___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users