Huge slowdown on Pentiums.

Archives Forums/Blitz3D Bug Reports/Huge slowdown on Pentiums.

@rtur(Posted 2005) [#1]
Hi!
I've been asking this before, but didn't recieved any reply, how to solve this problem.
I have noticed vary strange thing, my games runs very slow on pentium processors.
I think it is because of small meshes. Zero sized meshes.
Here is small test code:

Graphics3D 640,480,16,1    
    
Const UPS=60    
    
ModelGlobal = CreateSphere()    
HideEntity ModelGlobal    
    
Type test    
 Field Model    
End Type    
    
For i=1 To 1000    
 E.test = New test    
 E\Model=CopyEntity (ModelGlobal)    
 Size#=0 ;;try to change it to 1 or 0
   
 ScaleEntity E\Model,Size,Size,Size    
 PositionEntity E\Model,Rnd(-100,100),Rnd(-100,100),Rnd(-100,100)    
Next    
    
    
cam=CreateCamera()    
PositionEntity cam,0,0,-200    
    
l=CreateLight()    
    
period=1000/UPS    
time=MilliSecs()-period    
    
Repeat    
 Repeat    
  elapsed=MilliSecs()-time    
 Until elapsed    
 ticks=elapsed/period    
 tween#=Float(elapsed Mod period)/Float(period)    
     
 For k=1 To ticks    
  time=time+period     
  If KeyHit(1) End    
  UpdateWorld     
 Next    
    
   
     
 RenderWorld    
   
   
 frames=frames +1   
     If MilliSecs()-render_time=>1000 Then FPS=frames : frames=0 : render_time=MilliSecs()   
 Text 0,0,"FPS :"+FPS   
   Text 0,20,"Tris:"+TrisRendered()   
 Flip 0    
    
Forever    


set Size#=1 and look at results.
I think on the Athlons it will be normal(with 0-a lot fps, with 1 - less fps). But who has Pentium will recieve strange results.
Here are some results from last test:
Pentium 4, 2.4 GHz, intel 845 PE Motherboard, 1.5 GB RAM, Geforce 6800, Windows XP sp2, direct x 9

size#=0 ; results - fps = 6, tri = 0
size#=1 ; results - fps = 92, tri = 218848

An interesting bug there


Size=0 FPS=5
Size=1 FPS=58

Tested on P4 2.4/1MB, GF GTS 32MB , 512MB RAM, Win XP


Size=0 FPS=7 Tris=0
Size=1 FPS=170 Tris=218848

with entityalpha 0 which I assume has the same affect as size=0 on an AMD (and is the way I would choose to implement it anyhow)
Size=1 FPS=1200 Tris=0

in the last 2 the fps was varying by about 5 or so, i.e. it was fluctuating from 168-173.

Running on a P4 3.0gig/FX5950Ultra/1gig DDR/win XP 


And Athlon platforms(here is all ok):

Athlon XP 2700+, 512mb ram, Geforce 5700le 256mb, Windows Xp sp2
size#=0; fps = 316, tris = 0
size#=1; fps = 73, tris = 218848 


1.4 GHz Athlon, 512 megs RAM, XP Pro SP2, DirectX 9.0c, Radeon 9600 Pro:

Size# 0.0 = about 245 FPS, 0 Tris
Size# 1.0 = about 79 FPS, 218,848 Tris


size = 0: fps = 220 / tris = 0
size = 1: fps = 78 / tris = 218848 
XP with DX9.0c; Ubuntu Linux 5.04; AMD XP2600; Radeon 9800.


size = 0: fps = 655 / tris = 0
size = 1: fps = 85 / tris = 218848

I ran this on my AMD system listed below. 

Desktop:2.2GHz AMD 64 3500+ - 1GB Ram - eVga Geforce 6800GT - WinXP Pro SP2 w/Directx 9.0c
Laptop: Sager 5660-C, 2.4GHz P4 - 512MB Ram - ATI M9 64MB - WinXP Pro w/DirectX 9.0b 



@rtur(Posted 2005) [#2]
Plaese solve this problem.
I've already freezed one game because it runs very slow on pentiums(but very well on Athlons processors).

Btw, here are some screens from freezed game ;)
_http://artur.ag-tools.com/PacManiac/11-04-05.jpg
_http://artur.ag-tools.com/PacManiac/11-04-05_2.jpg

And it seems that my new game also has the same problem :(
I'm trying not to use zero sized meshes, but there are a lot of animations with scale meshes etc and it is hard to 100% guaranty that during rutime all will be ok.
And also problem that I haven't pentium to test all this things.
And the strangest thing - why on pentiums?? Why not video drivers problem or something...

PS: Sorry for my english.


Finjogi(Posted 2005) [#3]
Interesting... even if one dimension is scaled to 0 or very close like 0.0000000000000000000000000001 it slows down. It should be possible to scale a entity mesh to zero in one dimension and it should still draw the mesh.. tris drawn goes to 0 after scaling even one dimension to 0.

Tested yor code on intel Centrino..
I have no idea if it is blitz or directx pentium code or pentium itself..


HappyCat(Posted 2005) [#4]
Hehe - I was gonna post that "this has been reported before and there doesn't seem to be a fix" - but then I noticed that it was you that reported it so I'll just slope off into my hole again :-)