VOGONS


Slow load from network map ?

Topic actions

First post, by chmichael

User metadata
Rank Newbie
Rank
Newbie

Hello,
I map a network drive on windows, let's say x: -> \\server\share
Then i load dosbox and mount the map drive to a dosbox drive,
eg -> mount x: x:\

Now, everything on the X drive is slow ... even doing a dir causes a small 2 to 3 sec delay ...

Any ideas where to look in the source code to try fix this ?

Thank you

Last edited by chmichael on 2008-09-24, 01:00. Edited 1 time in total.

Reply 1 of 38, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

IIRC, dates and file sizes are not cached in DOSBox....and you really shouldn't be using DOSBox with mapped drives anyway.

Use a VM if you want to run your old DOS apps with mapped drives.

How To Ask Questions The Smart Way
Make your games work offline

Reply 5 of 38, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well depends, if you got some dos app that needs 1000 files in the subdirectory
you're out of luck with a games-emulator over network obviously. Otherwise
copy the relevant stuff into a subdirectory and mount that.

Reply 7 of 38, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Nope.
I think Qbix was playing with it, but feel free to post more information about
it (maybe you can identify the routines that are slow, must be something that
actually accesses the remote data, not the caching algorithms themselves).

Reply 8 of 38, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

and you really shouldn't be using DOSBox with mapped drives anyway.

C'mon, it's 2008, you know... (; Having lots of data on network drives (NAS's, File Servers, etc.) isn't that uncommon anymore. I've also noticed that DOSBox is a bit slow on mapped drives, but until now that wasn't a real issue. 1000 files in a directory is not "normal" usage, though - i don't think any game has that many files in a single dir.

Reply 9 of 38, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

yeah I played with it. The algorithms itself are fast enough, but i think the attempts to get information on each file might be slow

Water flows down the stream
How to ask questions the smart way!

Reply 10 of 38, by DosFreak

User metadata
Rank l33t++
Rank
l33t++
ADDiCT wrote:

and you really shouldn't be using DOSBox with mapped drives anyway.

C'mon, it's 2008, you know... (; Having lots of data on network drives (NAS's, File Servers, etc.) isn't that uncommon anymore. I've also noticed that DOSBox is a bit slow on mapped drives, but until now that wasn't a real issue. 1000 files in a directory is not "normal" usage, though - i don't think any game has that many files in a single dir.

Yeah, it's 2008.....so why are we still using NETBIOS to map drives?

But the main reason not to use them with DOSBox is that the amount of DOS games that need mapped drives can probably be counted on one hand. The only one I'm aware of is nlsnipes.

How To Ask Questions The Smart Way
Make your games work offline

Reply 12 of 38, by chmichael

User metadata
Rank Newbie
Rank
Newbie

Well, DosBox isn't made only for GAMES but for applications too. I have a custom Made DOS application which make this an ISSUE! (at least to me) ...

It scan the directory files for information and when the files are located in the network DOSBOX delays but if i move them locally it's Super FAST! (I haven't notice any delay if i move the files to my local hard drive)
(Also i need to access this application on other computers that's why it's on network drive)

As Qbix said there's some bottleneck in the way DosBox Cache Drive get's the file information.

I Hope someone finds a solution ... I'll try too but since i'm not a C++ developer (i developing in Delphi) it's hard because my C++ knowledge is limited. 😁

Thank you

Reply 13 of 38, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well, DosBox isn't made only for GAMES but for applications too.

No it targets at games ONLY so if you got issues with some app you're either
lucky that somebody has fun investing time into it, or you got to do that yourself.

Reply 14 of 38, by chmichael

User metadata
Rank Newbie
Rank
Newbie

Hello wd,
Well you should change DOSBox website title from: "DOSBox, a x86 emulator with DOS" to "DOSBox, a GAME emulator with DOS".

As far for the time i'm willing to pay anyone who has a solution. Just PM me to discuss.

Thank you

Reply 15 of 38, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It's not a matter of money but time 😀
Anyways feel free to keep posting information if you should figure something out,
just don't expect too much.
If you want to play with it try to compile dosbox from sources, and add some
logging (plain adding LOG_MSG()s with timing information to figure out what
parts might hurt speed). Just ask if something's unclear about compiling/modifying
the sources.

Reply 17 of 38, by chmichael

User metadata
Rank Newbie
Rank
Newbie

Speed up 1: There are some unnecessary "Log" functions left inside the drive_cache.cpp which aren't comment and produce slow down ...

Actually if i comment all the LOG* functions improves the DosBox Speed!
Maybe it's better to enable logging only on DEBUG mode.

Keep looking ...

Reply 18 of 38, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

seriously ? I designed the LOG()() class so that they should be optimized out in release mode. At least that happened last time I checked the compiled code (compiled with mingw though)

Water flows down the stream
How to ask questions the smart way!

Reply 19 of 38, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You said it only happens on network drives, so the LOGging is irrelevant.

Maybe you can try this: mount the network drive (only!) so the huge file
list is directly accessible, like mount k n:\ when n:\ is your network drive
and n:\ contains 1000+ files. Check the speed for a dir.
Then go to drive_cache.cpp, function CreateEntry() there is an if clause

	if (stat(buffer,&status)==0)	info->isDir	= (S_ISDIR(status.st_mode)>0);
else info->isDir = false;

which you replace (both lines removed) by an info->isDir = false;
Do the same speed test as above (note that you can't CD into directories
now but that does not matter).