I want to display the elapsed time of a user-invoked event.
But in implementing this feature I noticed that the feature itself adds a tremendeous amount of time to the oveall time the event runs.
For example, if I just display the start time and ending time for scanning an open file of some 60,000 lines, the elasped time is approx. 3 seconds.
BUT, if I call a subroutine within the while loop to update a label widget, it adds nearly 2 minutes to the overall elapsed time!
Example of subroutine:
> .label configure -text "[expr [clock seconds] - $st]
> update
where $st arg is passed in from the calling proc; set ST [clock seconds]
Will all progress-type functions add this much overhead??
Note: adding idletasks to the update cmd saves approx. 30 seconds in this example.
But in implementing this feature I noticed that the feature itself adds a tremendeous amount of time to the oveall time the event runs.
For example, if I just display the start time and ending time for scanning an open file of some 60,000 lines, the elasped time is approx. 3 seconds.
BUT, if I call a subroutine within the while loop to update a label widget, it adds nearly 2 minutes to the overall elapsed time!
Example of subroutine:
> .label configure -text "[expr [clock seconds] - $st]
> update
where $st arg is passed in from the calling proc; set ST [clock seconds]
Will all progress-type functions add this much overhead??
Note: adding idletasks to the update cmd saves approx. 30 seconds in this example.