Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / loading Memblock?

Author
Message
Juande
13
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 6th Jan 2013 20:16 Edited at: 6th Jan 2013 20:19
Hi everyone,

I am testing memblocks... but I haven't found anything about loading and saving memblocks... for theses reason I have created a load function... but it's very slow (I use a "for... next" for adding bytes to memblock )!

How do you load the memblocks?

Thanks
tornado
19
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 6th Jan 2013 22:50 Edited at: 6th Jan 2013 22:51
For cases of saving and loading, I suggest you do something like:
PSEUDOCODE


This should be rather fast working

Juande
13
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 6th Jan 2013 23:42 Edited at: 6th Jan 2013 23:42
Thanks for your code... but it's slower... This is my code for opening...



With this code... the loading is very slow...
For example:
You have a image (png) with load time of 1 second (if you load the image png)
You have a memblock (from the same image)... With this code, the load time is upper... 1.2 seconds, for example.

In Darkbasic, memblocks lead to short load time (milliseconds)... but in AppGameKit, i don't get it.

Thanks for your help!
tornado
19
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 7th Jan 2013 10:45
I use tier2, but processing time should be nearly equal
for uploading raw pixel data to memblock (2048x1536 bitmap)


that gives roughly 1.3 seconds for 3 mln loops:

2013-01-07 13:30:20.536 myApp[23410:707] data load cycle started
2013-01-07 13:30:21.819 myApp[23410:707] data load cycle finished

What is the size of your image?

Juande
13
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 7th Jan 2013 15:38
Yes, it's other way... but it's faster if you load the "png" image... I suppose that we have to wait for a "make memblock from file" command... (like as darkbasic pro)... This command is very very fast for loading images...

Thanks tornado!

Login to post a reply

Server time is: 2024-11-24 05:29:26
Your offset time is: 2024-11-24 05:29:26