After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730197 - Some ODF files take very long to import
Some ODF files take very long to import
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
1.11.x
Other Linux
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2014-05-15 14:47 UTC by Jean Bréfort
Modified: 2014-05-20 17:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample file (23.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-05-15 14:47 UTC, Jean Bréfort
Details
A sample file with just the formats (14.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-05-20 16:09 UTC, Jean Bréfort
Details

Description Jean Bréfort 2014-05-15 14:47:51 UTC
Created attachment 276605 [details]
Sample file

Not only that, gnumeric becomes quite unresponsive after loading. Seems that this concerns files with a database inside. Gnumeric adds autofilters to all columns.
With one large file I can't attach loading took around 20 minutes, but after saving as .xls in LO, the xls file tales less than 2 seconds to load.
Attached sample does not contain any data, just the headers, but still things are slow.
Comment 1 Morten Welinder 2014-05-15 16:19:35 UTC
That file takes a few seconds for me to load.  Moving around in the file
in any way that causes scrolling takes a long time, though.

Here's a typical stack trace.


  • #0 g_list_index
    from /usr/lib64/libglib-2.0.so.0
  • #1 gdk_window_add_update_window
    at gdkwindow.c line 3249
  • #2 impl_window_add_update_area
    at gdkwindow.c line 3820
  • #3 gdk_window_invalidate_maybe_recurse_full
    at gdkwindow.c line 3920
  • #4 gtk_widget_queue_draw_area
    at gtkwidget.c line 5155
  • #5 gtk_widget_queue_draw
    at gtkwidget.c line 5176
  • #6 gtk_widget_queue_resize
    at gtkwidget.c line 5204
  • #7 gtk_widget_set_usize_internal
    at gtkwidget.c line 10303
  • #8 goc_widget_notify_scrolled
    at canvas/goc-widget.c line 510
  • #9 goc_group_notify_scrolled
    at canvas/goc-group.c line 231
  • #10 goc_group_notify_scrolled
    at canvas/goc-group.c line 231
  • #11 goc_group_notify_scrolled
    at canvas/goc-group.c line 231
  • #12 goc_canvas_scroll_to
    at canvas/goc-canvas.c line 388
  • #13 gnm_pane_set_top_left
    at sheet-control-gui.c line 911
  • #14 gnm_pane_make_cell_visible
    at sheet-control-gui.c line 1013

Comment 2 Morten Welinder 2014-05-15 17:24:34 UTC
I don't think this is ods related at all.  Saving to xls truncates at 256
columns which is probably why it is faster.
Comment 3 Andreas J. Guelzow 2014-05-15 17:37:30 UTC
The reporter uses 1.11.x. We had some slow loading issues that have been fixed since then. It's the scrolling we really should be concerned about.
Comment 4 Andreas J. Guelzow 2014-05-15 17:44:58 UTC
This file when opened has lots of sheet objects. They seem to affect scrolling. The file contains
<table:database-range table:name="__Anonymous_Sheet_DB__0" table:target-range-address="Sheet0.A1:Sheet0.AMJ1048576"><table:sort><table:sort-by table:field-number="3" table:data-type="automatic"/></table:sort></table:database-range>

We interpret this to mean that we should have auto filters for all those columns...
Comment 5 Andreas J. Guelzow 2014-05-15 18:49:48 UTC
Our problem is that we seem not to be checking for the table:display-filter-buttons attribute. In ODF 1.2 it defaults to FALSE so we should not be showing those autofilter buttons.
Comment 6 Andreas J. Guelzow 2014-05-15 19:11:52 UTC
We are now using the table:display-filter-buttons attribute correctly. (Before we were reading it, defaulting to TRUE; but in fact were not using the setting at all.)

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

There is of course still the issue that if one want ed to show the buttons everything would be horribly slow. But that is not an ODF import issue.
Comment 7 Jean Bréfort 2014-05-20 06:32:48 UTC
The original file still takes around 10 minutes to load. When run in gdb, Ctrl+C always end in gnm_style_unlink_dependent() with traces such as:

  • #0 gnm_style_unlink_dependents
    at mstyle.c line 1956
  • #1 rstyle_apply
    at sheet-style.c line 318
  • #2 cell_tile_apply_pos
    at sheet-style.c line 1338
  • #3 sheet_style_apply_pos
    at sheet-style.c line 1427
  • #4 oo_cell_start
    at openoffice-read.c line 3975

Comment 8 Jean Bréfort 2014-05-20 07:56:21 UTC
And when closing the same file, gnumeric hangs. Typical trace is:

  • #0 dependent_pos
    at dependent.c line 436
  • #1 gnm_style_unlink_dependents
    at mstyle.c line 1954
  • #2 rstyle_apply
    at sheet-style.c line 318
  • #3 vector_apply_pstyle
    at sheet-style.c line 944
  • #4 cell_tile_apply
    at sheet-style.c line 1131
  • #5 cell_tile_apply
    at sheet-style.c line 1171
  • #6 cell_tile_apply
    at sheet-style.c line 1171
  • #7 cell_tile_apply
    at sheet-style.c line 1171
  • #8 cell_tile_apply
    at sheet-style.c line 1171
  • #9 sheet_style_set_range
    at sheet-style.c line 1362
  • #10 workbook_dispose
    at workbook.c line 156
  • #11 g_object_unref
    at /tmp/buildd/glib2.0-2.40.0/./gobject/gobject.c line 3075
  • #12 wbcg_close_if_user_permits
    at wbc-gtk.c line 1887
  • #13 wbc_gtk_close
    at wbc-gtk.c line 1934

Comment 9 Morten Welinder 2014-05-20 13:33:19 UTC
Large areas with conditional formatting?
Comment 10 Jean Bréfort 2014-05-20 15:10:01 UTC
At least 5 columns have conditional formating (and 1M rows)
Comment 11 Jean Bréfort 2014-05-20 16:09:24 UTC
Created attachment 276883 [details]
A sample file with just the formats

It takes some time to load and apparently never closes (or after a very long time).
Comment 12 Morten Welinder 2014-05-20 17:16:16 UTC
Give it another go.

The fundamental problem is known and hard to fix, but the common case doesn't
cause problems.