HP Forums
Program speed from sd card - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Program speed from sd card (/thread-156578.html)



Program speed from sd card - Iqbal - 09-19-2009

I wrote some programs for the 50G that are stored in port :0: ( which was originally done to prevent people from copying programs). I just changed them to run straight from the sd card. The problem is that the program is much slower running from a 16mb sd card than the calculator, even though it's identical. Why is this? Is there anything that can be done to improve speed from sd card?

Edited: 19 Sept 2009, 11:20 p.m. after one or more responses were posted


Re: Program speed from sd card - Raymond Del Tondo - 09-19-2009

Quote:
I wrote some programs for the 59G that are stored in port :0: ( which was originally done to prevent people from copying programs). I just changed them to run straight from the sd card. The problem is that the program is much slower running from a 16mb sd card than the calculator, even though it's identical. Why is this? Is there anything that can be done to improve speed from sd card?

The SD card is an external device, and its contents have to be copied to main RAM first to run. Port0 objects are evaluated directly.

There may be tweaks to improve speed somehow, but the principle stays the same;-)

HTH


Re: Program speed from sd card - Tim Wessman - 09-20-2009

Why specifically do they need to be in port 0 and not 2? What type of program is it and how much external data is being access vs. entered locally?

Running directly off the SD card is not really a good way to do it for speed reasons.

TW


Re: Program speed from sd card - Iqbal - 09-20-2009

Originally, I wrote them for the 48G series. And to prevent anyone from transferring via IR, I stored all the modules in Port :0:. It was not impossible to transfer but very difficult having so many modules. I am using the same programs although I had to change a few to work properly on the 50G. I am a land surveyor and all the programs and related to land surveying. Thanks, for the feedback.


Re: Program speed from sd card - Tim Wessman - 09-21-2009

Ok. I know a thing or two about land surveying software on the 50g. . . :-)

I assume all of the program is in userRPL since nothing else was specified. Feel free to correct me if needed.

Are you writing and accessing data (points or raw) from the SD card itself? If so, that is probably the largest speed hit. I'd recommend keeping data locally in HOME, and then writing it out to the SD card or port2 with some kind of backup routine. The rest of the commands should be organized into a library or a collection of libraries if you haven't done that yet.

That is what is going on with the surveying software I made. Basically, the program libraries reside in port2, and all variables are created in the hidden directory in HOME. The point database is stored in unused internal system RAM and is read in from the SD card using some C software. The only time it accesses the card is when loading or saving points, writing the RW5 info, saving a copy of current job/software settings, or accessing the code attribute file. In short, only times when speed isn't all that critical as it can take a second or two for some of the operations.

If that doesn't give you some ideas on what to do, or if you'd like some help with it, feel free to email me directly at timwessman_a_t_gmail.com