News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Maintenance release - 0.6.6
Author Message
Juergen
Member
***


Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
RE: Maintenance release - 0.6.6

iGame3D Wrote:
Hows that 0.6.6 coming along?
Do I have a chance to sneak in a little function request?

Problem: Tobi has created a "collect" feature that will gather assorted files and copy them to a destination.
Currently he's using io.open to read the files and then writing them back at the new location.
However its very slow this way, the larger the file gets the slower the process.

We could use os.execute(cp source dest) but that won't work on Windows.
I expected Lua File System to have such functionality but, seems it doesn't.

Think you could provide something at the murgaLua level?


Actually that functionality isn't even available (on the API level) on UNIX/POSIX (afaik). I don't know if Windows has a copy library function, but I haven't seen any on Unix.

Why does does os.execute not work? You have copy or xcopy on windows. Also for larger junks it makes often sense to use tar -c | tar -x or cpio to do the copy. Under a few circumstances this can be significantly faster.

And yes copying with Lua is a lot slower compared with C. I guess immutable strings don't really help here. I also did a few tests a few months ago and found that murgaLua has a 30% overhead (file io) compared to the stock SuSE Lua binary (and also a self compiled one).

Btw. for Windows there is a "run" utility available which can suppress the console window.

Juergen

03-15-2008 10:13 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Maintenance release - 0.6.6 - JohnMurga - 03-11-2008, 12:12 AM
RE: Maintenance release - 0.6.6 - mikshaw - 03-11-2008, 01:57 AM
RE: Maintenance release - 0.6.6 - iGame3D - 03-11-2008, 07:51 AM
RE: Maintenance release - 0.6.6 - iGame3D - 03-15-2008, 08:46 PM
RE: Maintenance release - 0.6.6 - Juergen - 03-15-2008 10:13 PM
RE: Maintenance release - 0.6.6 - iGame3D - 03-16-2008, 02:20 AM
RE: Maintenance release - 0.6.6 - mikshaw - 03-16-2008, 04:55 AM
RE: Maintenance release - 0.6.6 - iGame3D - 03-16-2008, 07:06 PM
RE: Maintenance release - 0.6.6 - Juergen - 03-17-2008, 04:55 AM
RE: Maintenance release - 0.6.6 - mikshaw - 03-17-2008, 09:00 AM
RE: Maintenance release - 0.6.6 - jpjacobs - 03-18-2008, 01:49 AM
RE: Maintenance release - 0.6.6 - mikshaw - 03-18-2008, 01:00 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: