Conversion very very slow

Bug #947100 reported by fracarz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Excel2LaTeX
In Progress
High
Unassigned

Bug Description

I have performance problem with the macro. After invoking the "Convert to..." command, the window with the latex code appears after at least 15 seconds but often after 30 seconds. Moreover, the same time it is required just to check or uncheck one of options (like "Create table environment", "Convert $...") inside the window (probably because these options recreate the latex code). How come?
(more info: the table size are 20x10, I am using snow leaopard and office 2011, the macro is fast on an empty table and unchecking the "Convert $..." did not help me).

Related branches

Revision history for this message
Kirill Müller (krlmlr) wrote :

Thanks for adding this as new bug.

Yes, the LaTeX code is updated upon each change in the options. Could you please tell me how long it takes with tables of the following sizes:

- 20x20
- 10x10
- 10x5
- 5x10
- 5x5

This will help identify potential performance problems.

Revision history for this message
fracarz (fracarz) wrote :

I performed the test following your sequence and the results are:

- 20x20 = 54 seconds
- 10x10 = 6 seconds
- 10x5 = 5x 10 = 2 seconds
- 5x5 = 1 second

The table contains only numbers and short words.

Revision history for this message
Christopher Bakey (cbakey) wrote :

Any updates on this? I am working on converting a large (54X2500) table and I am not sure how long it should take or if Excel2Latex can handle a file of that size.

Revision history for this message
fracarz (fracarz) wrote :

I tried with the version 32b revision 259 download from here: http://bazaar.launchpad.net/~mail-kirill-mueller/excel2latex/trunk/files/259
There is a light improvement as reported below but it is again slow on big table 20x20.

- 20x20 = 45 seconds
- 10x10 = 4 seconds
- 10x5 = 1 second

Is the version I am using the last one? Are you converting a table 54x2500?

Revision history for this message
Christopher Bakey (cbakey) wrote :

I am working on trying to convert a table from 54 X 2500. It has been working for about 2 hours, and excel is non-responsive.

Revision history for this message
fracarz (fracarz) wrote :

I think that 54x2500 is too big. If for a matrix 20x20 are required 45 seconds for a 54x2500 probably it requires a day.

Revision history for this message
Kirill Müller (krlmlr) wrote :

Sorry for the slow response.

Even the times for a 10x10 table are too slow. Plus, the runtime is superlinear in the size of the input. I suspect a performance problem with the string implementation in Office:mac VBA, but a coarse Google search didn't find anything interesting.

Unfortunately, I still don't have regular access to a Mac. If anyone is willing to investigate this issue I will be more than happy to incorporate working patches.

Perhaps I can at least turn off the interactive preview in the Mac version. Then the dialog remains usable, though the conversion will still take a long time.

Note that the Windows version does not seem to suffer from this performance problem.

Revision history for this message
fracarz (fracarz) wrote :

According to the information I found on internet, the macros run very slow on excel 2011 in respect to the windows version. In the mac office forum there are some advises regarding how to write the macro source code to improve the running time, for instance here: http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macexcel/excel-for-mac-hangs-for-15-minute-periods/cf4e6260-00ac-4d6e-b136-92b976a1cb57
or in general: http://answers.microsoft.com/en-us/Search/Search?SearchTerm=macro+slow&CurrentScope.ForumName=mac&CurrentScope.Filter=macoffice2011-macexcel&askingquestion=false

Hope this help.

Revision history for this message
Kirill Müller (krlmlr) wrote :

Please check performance in the fresh 3.3 release:

http://bazaar.launchpad.net/~mail-kirill-mueller/excel2latex/3.3/files

Changed in excel2latex:
status: New → In Progress
Kirill Müller (krlmlr)
Changed in excel2latex:
importance: Undecided → High
Revision history for this message
fracarz (fracarz) wrote :

I tried the new version 3.3 but nothing changes. The time required for the three previous tables is exactly the same of version 32b revision 259.

Revision history for this message
Kirill Müller (krlmlr) wrote :

Pity. I've noticed some improvement, but I didn't really measure it. (I assume you are sure that the new version is used in your tests. If in doubt, check the "About" dialog.)

Seems that preview will have to be turned off (or reduced to, say, a subtable of size 3x3 at most) in the Mac version.

Revision history for this message
fracarz (fracarz) wrote :

I used the version 3.3 and later come back to the 2.0 that strangely reaches to generate instantly the same table. I also tried the new macro on another imac with a clean installation of office. The time is 43 seconds instead 45, but this seems strange because the cpu is better on the new computer. Anyway, where is the about button to check the version? The only menu that appears in excel are "Convert table to latex" and "Convert all table to Latex".

How can I turn off the preview?

Revision history for this message
Kirill Müller (krlmlr) wrote :

A lot has changed in the code, it became substantially more complex. For example, now per-cell deviations from the default alignment is tracked, and this isn't exactly fast.

I'll check if it's possible to provide two conversion modes: "fast" and "accurate", where the former turns off time-consuming processing at the expense of a less accurate result.

The button is called "Help", and not "About". The version reported in the title is 3.2, in the text it's 3.3. Oh my...

Turning off the preview will require some minor coding.

Revision history for this message
Kirill Müller (krlmlr) wrote :

...The "Help" button is in the dialog.

Revision history for this message
fracarz (fracarz) wrote :

Yes. The version reported is the title is 3.2 but there is no text below (just an empty window).
Is it possible to insert a flag to enable/disable the preview? This could avoid the implementation of the "fast" and "accurate" versions (if the preview is the cause of problem).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.