Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] model: create snapshot when loading xlsx file #5320

Closed
wants to merge 1 commit into from

Conversation

Rachico
Copy link
Contributor

@Rachico Rachico commented Dec 5, 2024

Before this commit, when uploading an XLSX file, the code in the Odoo repository would create a spreadsheet document with data that is encoded in xml. Whenever the file is loaded, we parse the stringified xml to convert it to the o-spreadsheet json structure. The problem is that this conversion can be quite slow and costly when the XLSX file is large.

This commit mitigates the issue by saving a snapshot once the XLSX file is loaded for the first time.

Task: 4080514

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

@robodoo
Copy link
Collaborator

robodoo commented Dec 5, 2024

Pull request status dashboard

@Rachico Rachico force-pushed the 18.0-snapshot-when-open-xlsx-mera branch 2 times, most recently from d4ac9cd to 1bbd91a Compare December 18, 2024 11:58
@Rachico Rachico force-pushed the 18.0-snapshot-when-open-xlsx-mera branch 2 times, most recently from 4804a36 to adb4f86 Compare December 20, 2024 16:48
@Rachico Rachico requested a review from pro-odoo December 20, 2024 16:49
@Rachico Rachico force-pushed the 18.0-snapshot-when-open-xlsx-mera branch from adb4f86 to ec339bc Compare January 3, 2025 10:53
Before this commit, when uploading an XLSX file, the code in the
Odoo repository would create a spreadsheet document with data that
is encoded in xml. Whenever the file is loaded, we parse the stringified
xml to convert it to the o-spreadsheet json structure. The problem is
that this conversion can be quite slow and costly when the XLSX file is
large.

This commit mitigates the issue by saving a snapshot once the XLSX file is
loaded for the first time.

Task: 4080514
@Rachico Rachico force-pushed the 18.0-snapshot-when-open-xlsx-mera branch from ec339bc to ffd9080 Compare January 3, 2025 10:55
@Rachico Rachico requested a review from LucasLefevre January 3, 2025 10:56
Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo r+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants