Hi,
has anyone made the same experiences?
My App is on XP fast and on Win 7 very, very slow, when I wanna display something with OpenWindowedScreen....
Btw: I´m not the person, who counts milliseconds...
br and thx
Marco
Speed-Difference: Win 7 and XP -> Drawing lib
Speed-Difference: Win 7 and XP -> Drawing lib
Last edited by Marco2007 on Thu Nov 19, 2009 11:35 pm, edited 5 times in total.
PureBasic for Windows
- Kaeru Gaman
- Addict

- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Re: OpenWindowedScreen very slow on Win 7 :-(
subsystem?
... using DX7 on Win7 or Vista needs to switch off Aero, wich not only takes time but also has optical side effects.
... using DX7 on Win7 or Vista needs to switch off Aero, wich not only takes time but also has optical side effects.
oh... and have a nice day.
Re: OpenWindowedScreen very slow on Win 7 :-(
I use the new standard Direct9X (4.40b7), but also same result with 4.31 and sub Dx9.
I`m so surprised, because it`s soooo slow...I will cut the code to a minimum...
....there something wrong with OpenWindowedScreen and for/next ...but I don`t know what...
App is running for about 1.5 years without any problems on XP (since 4.02), but on Win 7 it`s very slow...
***** Edit:
Could anyone please try this code on Win 7 and XP:
XP -> finished within a second
Win7 -> about 5 seconds...
I changed to:...but I´m really surprised, why there`s so much difference between XP and Win 7...
thx
I`m so surprised, because it`s soooo slow...I will cut the code to a minimum...
....there something wrong with OpenWindowedScreen and for/next ...but I don`t know what...
App is running for about 1.5 years without any problems on XP (since 4.02), but on Win 7 it`s very slow...
***** Edit:
Could anyone please try this code on Win 7 and XP:
Code: Select all
If InitSprite() = 0 : End : EndIf
If OpenWindow(0, 0, 0, 220, 160, "A screen in a window...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If OpenWindowedScreen(WindowID(0), 0, 0, 160, 160, 0, 0, 0)
For f=0 To 100
For i=270 To 810 Step 1
StartDrawing(ScreenOutput())
StopDrawing()
Next
Next
EndIf
EndIfWin7 -> about 5 seconds...
I changed to:
Code: Select all
StartDrawing(ScreenOutput())
For f=0 To 100
For i=270 To 810 Step 1
Next
Next
StopDrawing()thx
PureBasic for Windows
Re: Speed-Difference: Win 7 and XP -> Drawing lib
Takes around 4-5 seconds to end for me on Vista
(4.40b7 x86)

Re: Speed-Difference: Win 7 and XP -> Drawing lib
It seems to be the ScreenOutput() (as you can see by trying the attached code).
Buffering the ScreenOutput() will maybe not work if you have a FlipBuffers() within the Loops.
BUT - if you don't have a FlipBuffers() within the loop, you should do it the "new" way (the 2nd way you posted above) anyway.
The following code will end within Milliseconds on Vista as well:
Greetz, PL.
Buffering the ScreenOutput() will maybe not work if you have a FlipBuffers() within the Loops.
BUT - if you don't have a FlipBuffers() within the loop, you should do it the "new" way (the 2nd way you posted above) anyway.
The following code will end within Milliseconds on Vista as well:
Code: Select all
If InitSprite() = 0 : End : EndIf
If OpenWindow(0, 0, 0, 220, 160, "A screen in a window...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If OpenWindowedScreen(WindowID(0), 0, 0, 160, 160, 0, 0, 0)
Timer1 = ElapsedMilliseconds()
ScrOut = ScreenOutput()
For f=0 To 100
Dummy = WindowEvent()
For i=270 To 810 Step 1
StartDrawing(ScrOut)
StopDrawing()
Next
Next
Timer2 = ElapsedMilliseconds()
MessageRequester("Duration",Str(Timer2-Timer1)+"ms")
EndIf
EndIf
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
Re: Speed-Difference: Win 7 and XP -> Drawing lib
PureLust, your code in the post above mine takes 47 ms on Windows 7 here.
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
