if you try the following code, it takes almost a minute to complete:
Code: Select all
For i = 1 To 10000
Debug i
Next
Code: Select all
for i in range(10000):
print i

Best regards
Uwe
Code: Select all
For i = 1 To 10000
Debug i
Next
Code: Select all
for i in range(10000):
print i
Is that code in python for debugging? For comparison use similar (non-debug) code in PureBasic and it will also run in less than a second:uwekel wrote:if you try the following code, it takes almost a minute to complete:The same code in python on the same machine takes less a second:Code: Select all
For i = 1 To 10000 Debug i Next
Just to let you know, that there is potentialCode: Select all
for i in range(10000): print i
Code: Select all
OpenConsole()
For i = 1 To 10000
PrintN(Str(i))
Next
Input()
Code: Select all
Debug$ = Debug$ + #LF$ + Line$
3 seconds hereTrond wrote:It takes less than 15 seconds here. But GTK is a horribly slow toolkit so I guess the Linux version would use much longer time.
I don't think that we can blame it on GTK. The Wing IDE use GTK as wellBut GTK is a horribly slow toolkit so I guess the Linux version would use much longer time.
Maybe it is a Linux problem.Btw, it does not slow down here with every line of debug output.
Oh, I didn't mention that I was also using GTK on Linux.uwekel wrote:[..]I don't think that we can blame it on GTK. The Wing IDE use GTK as wellBut GTK is a horribly slow toolkit so I guess the Linux version would use much longer time.
Maybe it is a Linux problem.Btw, it does not slow down here with every line of debug output.
Well I understand. Sometimes I also just want to seeI often use the Debug command to print some values to the output window. In my special case i received a bunch of lines from a newsserver. There was no need to read every line because it contained encoded data, but i just wanted to see the receiving result of an NNTP command.
The python console in Wing is actually a scintilla widget. You can tell by the prolonged horizontal scrollbar and the context menu that appears a few pixels off (and also Wing IDE is listed as using scintilla on scintilla.org).uwekel wrote:I don't think that we can blame it on GTK. The Wing IDE use GTK as wellBut GTK is a horribly slow toolkit so I guess the Linux version would use much longer time.
That surprises me. I have an Intel i7-2600K with 8GB ram but no graphic card (i use the onboard intel graphics). Why the hell it is so slow?But you were right, changing from 10'000 to 100'000 shows the slowdown here too.
Because it's a debug output, not a runtime output (as Freak said). It's just meant to be used to display something to you to aid in debugging. Using it in a tight for/next loop like that is not debugging. You're trying to force it to be a pseudo-window instead of its intended purpose. "Debug" in PureBasic is not the same thing as "Print" in Python.uwekel wrote:Why the hell it is so slow?