Re: Excel XLS Import slowdown in version 8
- To: mathgroup at smc.vnet.net
- Subject: [mg116257] Re: Excel XLS Import slowdown in version 8
- From: Lou <lvveen32 at xs4all.nl>
- Date: Tue, 8 Feb 2011 05:08:20 -0500 (EST)
- References: <iig75v$rkm$1@smc.vnet.net> <iigpkd$212$1@smc.vnet.net>
On 4 feb, 12:58, Albert Retey <a... at gmx-topmail.de> wrote:
> Hi,
>
> > I have noticed in Mathematica version 8 that Excel (.xls, not the new
> > format) importing is about 3.5 times slower than in version 7. I
> > noticed this because I have a script that reads two sheets from many
> > Excel files that used to take 1.5 seconds per file that now takes
> > around 5.18 seconds per file (AbsoluteTiming). Nothing else is done in
> > that part of the script; it is just a map of an Import command over a
> > list of Excel files. Is anyone else experiencing this slowdown? What
> > is the cause? Are there any remedies?
>
> We have also noticed that the Import of xls-files can be much slower in
> Version 8 than it was in Version 7. Especially if there are plots within
> those files, the import in 8 can be horrible slow, in some cases Import
> becomes completely useless. It looks like it has to do something with
> the plots, but so far I have not found a way to avoid that, e.g. by just
> importing the "Data" element. What has helped in most cases is to delete
> all plots in the xls-files before importing, but of course that is just
> a workaround and might not be a solution if you have many files, as
> seems the case for you...
>
> I would be very interested to hear if anyone has found ways to improve
> the import speed of xls-files in version 8 or switch back to the version
> 7 behaviour...
>
> hth,
>
> albert
It's very very very slow...
I wonder why but it seems Javaw has allot to do ..
try:
In[4]:= writexls = Table[{Range[Random[], 50]}, {x, 1, 1370}];
In[5]:= Export["xl.XLS", writexls]
Out[5]= "xl.XLS"
In[6]:= readxl = Import["xl.XLS"];
On total this short program consumes 2:34.4 (used a stopwatch).. 2,5
minutes!
But...
In[22]:= writexls = Table[{Range[Random[], 50]}, {x, 1, 1369}];
In[23]:= Export["xl.XLS", writexls]
Out[23]= "xl.XLS"
In[24]:= readxl = Import["xl.XLS"];
is ready within 2.4 second..
This is with Mathematica 8. With Mathematica 7 it's slow but not that slow....
This seems to me like a bug somewhere.
I also notice that writing the XLS takes time but reading is much much
much slower.
Kind regards,
Lou