Re: Performance problems with "photo copy -to"

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Performance problems with "photo copy -to"
De : saitology9 (at) *nospam* gmail.com (saito)
Groupes : comp.lang.tcl
Date : 08. Nov 2024, 05:18:12
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vgk3e5$3255t$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
On 11/7/2024 3:43 PM, Paul Obermeier wrote:
I have a simple tiling procedure and noticed a slowdown when using large images,
i.e. when doing lots of copies.
 I noticed the following behaviours (both on Windows and Linux):
1. The time for copying does not grow linearly, as expected, but gets larger the more copies are involved.
2. The copy time of Tcl/Tk 9 is nearly twice the time as when using Tcl/ Tk 8.6.15 or the combination
    Tcl 8.7/Tk 9. So this performance degradation does not seem to stem from Tk9, but from Tcl9. Strange!
 Can anybody confirm my measurements?
 
I wonder if it has something to do with memory management for images.
On Windows Tcl/Tk 8.6.12, I first got results very close to your Tcl/Tk 9.0.0 versions.  I ran it again and it got worse. It was embarrassingly slow so I won't disclose it here. Let's say the numbers almost tripled, and it worsened with the size of the images.
But then it errored out with a funny message :-)

not enough free memory for image buffer
The code was not deleting the images so it was running out of memory.
So I changed your code slightly and got these results:
% image delete [Tile $srcImg 10 10]
Time for  100 copies:  1.24 seconds ( 12 milliseconds / copy)
% image delete [Tile $srcImg 20 20]
Time for  400 copies: 19.01 seconds ( 47 milliseconds / copy)
...

Date Sujet#  Auteur
7 Nov 24 * Performance problems with "photo copy -to"9Paul Obermeier
7 Nov 24 +* Re: Performance problems with "photo copy -to"2elns
7 Nov 24 i`- Re: Performance problems with "photo copy -to"1elns
8 Nov 24 +* Re: Performance problems with "photo copy -to"2greg
8 Nov 24 i`- Re: Performance problems with "photo copy -to"1greg
8 Nov 24 +- Re: Performance problems with "photo copy -to"1saito
8 Nov 24 `* Re: Performance problems with "photo copy -to"3Paul Obermeier
9 Nov 24  +- Re: Performance problems with "photo copy -to"1greg
10 Nov 24  `- Re: Performance problems with "photo copy -to"1Harald Oehlmann

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal