Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Performance questions #309644
02/10/10 15:02
02/10/10 15:02
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline OP
Junior Member
TrackingKeks  Offline OP
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
OK, I have 2 questions about the file reading performance.
Is it faster to run 2 functions which read some files at the same moment or one after another?
My second question: Is there a big time difference between reading all the data out of 1 file or out of a few files?
Thank you for your help!


Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)
Re: Performance questions [Re: TrackingKeks] #309650
02/10/10 15:40
02/10/10 15:40
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
it is always faster to access a file without too much seeking (resetting the read head position). with small files there won't be a big difference because of the memory buffering.
and it is always slower to have multiple files, as i said, because of the read head repositioning and the file system overhead (reading the mft, seeking etc.).

but as always, there might be exceptions, depending on what you want to do.

Re: Performance questions [Re: TrackingKeks] #309661
02/10/10 16:10
02/10/10 16:10
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline OP
Junior Member
TrackingKeks  Offline OP
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
Thank you for answering.
I would like to write a "place system" in my game which places all the entities on a grid so that there is an easy access possible for managing and the build editor.

On the one hand reading needs 1 minute with all the data (at the moment 540 files!!+And how long does writing take?).

On the other hand I think when there is only one file the managing is too complicated.


Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)
Re: Performance questions [Re: TrackingKeks] #309672
02/10/10 16:37
02/10/10 16:37
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
so you store every entity position in a separate file? that's slow. just make up a custom file format and store all your data there.

Re: Performance questions [Re: TrackingKeks] #309697
02/10/10 18:53
02/10/10 18:53
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline OP
Junior Member
TrackingKeks  Offline OP
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
No, I do it in a different way. I have a map (90x90). The entity type is written in a file with the name of its y position and in the line of its x pos. So there are only 90 files with 90 lines for the type.


Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)
Re: Performance questions [Re: TrackingKeks] #309828
02/11/10 14:54
02/11/10 14:54
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
versteh' ich nicht. du kannst auch deutsch schreiben, wenn du willst.

Re: Performance questions [Re: Joey] #309971
02/12/10 12:08
02/12/10 12:08
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline OP
Junior Member
TrackingKeks  Offline OP
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
OK. Ich habe eine große Insel, die mit einem Raster versehen worden ist. Dieses Raster ist in meiner eigenen "Einheit" 90x90 groß, d.h. es können theoretisch 90 Objekte in x-Richtung und 90 Objekte in x-Richtung platziert werden (insg. max. 8100 Objekte platzierbar).
Die Definitionen stehen in 90 Dateien. In jeder der Dateien sind 90 Zahlen, jede Zahl steht für einen Objekttyp. Anhand dieser wird die Welt nach dem Raster aufgebaut.
Es sind 90 Dateien und 90 Definitionen/Zeilen pro Datei, da z.B. in Datei 16 alle Daten für die Y-Spalte vorhanden sind: insg. alle 90 x-Werte.

Beispiel Datei 54:
0 0 6 2 1...
Y-Wert nach Raster 54:
X-Wert 1: kein Objekt
X-Wert 2: kein Objekt
X-Wert 3: Objekt 6
X-Wert 4: Objekt 2
X-Wert 5: Objekt 1

Hoffentlich hast du es jetzt verstanden:)


Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)
Re: Performance questions [Re: TrackingKeks] #310166
02/13/10 13:33
02/13/10 13:33
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
naja den Aufbau der Datei nicht so ganz, ist aber ja auch nicht so wichtig. Was spricht dagegen, einfach ein [90][90]-Array mit was auch immer du darin speichern möchtest zu serialisieren? Hau einfach ein reinterpret_cast<char*> drauf und schreibs byteweise in eine Datei. Der Vorteil: du kannst das Array sehr schnell wieder laden.

Re: Performance questions [Re: Joey] #310885
02/17/10 14:50
02/17/10 14:50
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline OP
Junior Member
TrackingKeks  Offline OP
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
OK. ich werde es versuchen. Danke!


Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)

Moderated by  HeelX, rvL_eXile 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1