Access to file in Windows Xp

F

FelixCatus

Good morning to all,
I have written a simple python script that extracts data from a lot
(800Mb) of text files.
Now... In Linux the extraction runs in more or less 1s in Windows Xp
it takes 325 - 326 s.
The hardware is the same.
I have also noticed somehing similar when moving the files from a
directory to another
so it is not a problem due to my python script.
But why is windows so slow in working with files?
Is there something that I can do to make my script a bit faster on
windows?
Is there any improvement for that point if I move to python3 (now I'm
using python 2.6)?
Thanks in advance to all
 
J

Jon Clements

Good morning to all,
I have written a simple python script that extracts data from a lot
(800Mb) of text files.
Now... In Linux the extraction runs in more or less 1s in Windows Xp
it takes 325 - 326 s.

I find that really hard to believe; I don't think I'd even be
convinced 1s is correct if all the files were mounted under a ramfs,
with blazingly fast RAM and huge amounts of multi-core CPUs running in
parallel.

I'd guess your code has a subtle flaw that:
1) under Linux causes it to not do some work
2) under XP causes it to do too much work

Can you confirm you get the same results, and maybe post some code?

Jon.
 
F

FelixCatus

I find that really hard to believe; I don't think I'd even be
convinced 1s is correct if all the files were mounted under a ramfs,
with blazingly fast RAM and huge amounts of multi-core CPUs running in
parallel.

I was not clear in my message, I don't have to open all files,
but just a smaller amount of them.
I'd guess your code has a subtle flaw that:
1) under Linux causes it to not do some work
2) under XP causes it to do too much work

Can you confirm you get the same results, and maybe post some code?

Jon.

Just now I have found the issues.
First of all in the win xp system I have discovered that there is the
same processor of the linux station but much more less ram
and so the system uses intensive swapping.
With my personal computer wich has a smaller amount of ram and a not
so good processor (not the one on the mounting station)
it took more or less the same time of the mounting station in the
first try but I have discovered that the problem was the AVG
Anti-virus that makes some analysis each time you open a file.
Stopping the antivirus the execution time is reduced down to 56s.
On monday I can try to disable the antivirus also on the mounting
station and watch how many time it spends
to process the files.
In Linux I don't have the antivirus nor a lot of processes that runs
concurrently as it happens in windows.
So... Sorry for the inconvenience, this is not a real python issue but
just a computer problem.
Thanks for your support :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,043
Members
48,769
Latest member
Clifft

Latest Threads

Top