vaadin / flow-components

Java counterpart of Vaadin Web Components
100 stars 66 forks source link

Spreadsheet (Vaadin24) editing is slow with large files #4875

Open ARCHERS opened 1 year ago

ARCHERS commented 1 year ago

Description

Editing of Excel files in the Spreadsheet component in Vaadin 24 (and in previous versions as well) is very slow for large files (eg 5000 rows). Although the file loads quickly, inserting a new row or deleting a row via the context menu takes 30-60 secs before the UI refreshes. However individual cell editing or hiding a row is still quick. The response time for row manipulation seems to only become reasonable when the row count is dropped to 200 or less. The same issue was flagged in 2018 and probably relates to Apache POI functionality: [https://github.com/vaadin/spreadsheet/issues/656](https://github.com/vaadin/spreadsheet/issues/656] and [https://github.com/vaadin/spreadsheet/issues/670].

Expected outcome

The response time should be much quicker.

Minimal reproducible example

        String fileSource = "/schedules/mylargefile.xlsx";
        InputStream stream = getClass().getResourceAsStream(fileSource);
            try {
                spreadsheet = new Spreadsheet(stream);
            } catch (IOException e) {
                //
            }
            add(spreadsheet);

Steps to reproduce

  1. Add the snippet to a view.
  2. Paste the excel document into the appropriate resource folder.
  3. Open the view and try deleting or inserting a row.

Environment

Vaadin version(s): 24 OS: Windows

Browsers

Firefox, Chrome

WoozyG commented 1 year ago

I've seen this too. Not sure if it's a POI or Vaadin issue yet, or both.