Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 730 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Multi-threading (for A8) guru needed. [Re: WretchedSid] #384596
10/05/11 09:29
10/05/11 09:29
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Sorry guys, Im afraid I STILL havent done a real read-through the last few posts. But I will!

I'm busy fighting my file-reader coding ATM. Pointer issues... no surprise! Im NOT looking for help on that though, cause I need to
get back up-to-speed with pointers anyway, and I'll get there soon enough. Then I'll get back on track with my thread testing.

But in the meantime, as an off-topic (hey! Its MY thread, I can do it!), can anyone answer these API questions?

1> The "FileCreate" in my sample code is causing a noticable 'lag' when FIRST opening the file in question. This makes me suspect that
the WHOLE file is being cached somewhere. Is my suspicion correct?

2> Is this file being cached INSIDE the acknex workspace, or is it being cached by the OS somewhere outside? ( my diagnostic attemps were inconclusive)

3> Is there any way to prevent the cacheing, or to limit the size of the 'chunk' being cached? (for this ONE file, and from within API)

For these questions, I need to TRY and keep with OpenFile for its ability to allow control of the internal file pointer when retrieving data.

Thanks guys.


PS: Damn, this off-topic nearly deserves its own thread, but we'll see how it goes. Maybe later.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Multi-threading (for A8) guru needed. [Re: EvilSOB] #384824
10/08/11 22:44
10/08/11 22:44
Joined: Apr 2009
Posts: 33
Germany
B
Bunsen Offline
Newbie
Bunsen  Offline
Newbie
B

Joined: Apr 2009
Posts: 33
Germany
Off-Topic:

1> No, not the WHOLE file.

2> It is cached on the far heap (INSIDE your application).

3> Yes, but not with "CreateFile", (as far I know).

>>For these questions, I need to TRY and keep with OpenFile for its ability to allow control of the internal file pointer when retrieving data.
What???

Re: Multi-threading (for A8) guru needed. [Re: Bunsen] #385108
10/13/11 04:16
10/13/11 04:16
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
OK, Im finally back.
I was doing a rebuild of my work-pc (where I do my lite-c work),
and it went horribly wrong when I connected to the network...

Bunsen:
1> It must just be cacheing either a large chunk, or it is the
OS trying to 'find' the file. (deep path ATM)

2> Then do you know if the default.c diag panel shows this memory usage?
I couldnt see any change...

3> I have since discovered CreateFile CAN read non-buffered, but it gets ugly.
You need your own buffer/chunksize to match the HDD clustersize(simplified description)

>> If I open the file using CreateFile, I can move the 'readfrom' position manually using the 'SetFilePointer' API.
That way I could openfile, read a bit, skip a bit, read a bit, etc, close. NEVER going backwards.

BUT, since then, Ive decided I want to use a zip-library in my app to reduce the file-size.
Buffering becomes a necessity then, so Ive dropped the whole no-buffer idea completely.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Multi-threading (for A8) guru needed. [Re: EvilSOB] #385110
10/13/11 04:35
10/13/11 04:35
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
OK everyone, this thread is now actually, RESOLVED, but I cant update the thread heading anymore.

Iv looked at eryones stuff (to varying degrees) and appreciate all your input,
every little bit helped.

I have ended up going in the following directions...

1> The vertex-displacement thread has been abandoned and merged into the buffering function.
ent_getvertex was too unreliable in a thread, and syncronising the thread not worth the effort.

2> The datafile-read thread is working nicely without a 'standard' mutex system.
I am using a pointer shared between both threads as a mutex, and a shared flag to terminate all threads.
I can post the code if someone wants, I just dont have that usb-stick installed ATM...


Thanks all for your inputs...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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