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

[FW][FIX] export: faster border and style export #3262

Closed
wants to merge 1 commit into from

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented Nov 24, 2023

Description:

deepEquals is faster than comparing the stringified values. On a sheet provided by RNG, getBorderId goes from ~1.4s to ~250ms

Task: : TASK_ID

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

Forward-Port-Of: #3254
Forward-Port-Of: #3248

@robodoo
Copy link
Collaborator

robodoo commented Nov 24, 2023

@fw-bot
Copy link
Collaborator Author

fw-bot commented Nov 24, 2023

@LucasLefevre @hokolomopo cherrypicking of pull request #3248 failed.

stdout:

Auto-merging src/helpers/misc.ts
Auto-merging src/plugins/core/borders.ts
CONFLICT (content): Merge conflict in src/plugins/core/borders.ts

stderr:

11:50:32.088186 git.c:463               trace: built-in: git cherry-pick d6cf81bdf157bd135fb86098c9e3de638d618421
error: could not apply d6cf81bdf... [FIX] export: faster border and style export
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
----------
status:

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

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+

@LucasLefevre LucasLefevre force-pushed the saas-16.3-15.0-perf-again-lul-reOe-fw branch from cb118ef to 8d2ef4a Compare December 5, 2023 08:30
`deepEquals` is faster than comparing the stringified values.
On a sheet provided RNG, `getBorderId` goes from ~1.4s to ~250ms

There was also a bug in the border export code.
`stringify` filter nested object keys (because of the ).

{
   top: { style: "thin", color: "#000" },
}

would give { top: {}}

I'm removing the `stringified` function because it not used anymore
and it doesn't work as expected.

X-original-commit: ad487d3
@LucasLefevre LucasLefevre force-pushed the saas-16.3-15.0-perf-again-lul-reOe-fw branch from 8d2ef4a to 57edffc Compare December 5, 2023 08:31
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+

robodoo pushed a commit that referenced this pull request Dec 5, 2023
`deepEquals` is faster than comparing the stringified values.
On a sheet provided RNG, `getBorderId` goes from ~1.4s to ~250ms

There was also a bug in the border export code.
`stringify` filter nested object keys (because of the ).

{
   top: { style: "thin", color: "#000" },
}

would give { top: {}}

I'm removing the `stringified` function because it not used anymore
and it doesn't work as expected.

closes #3262

X-original-commit: ad487d3
Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
@robodoo robodoo closed this Dec 5, 2023
@fw-bot fw-bot deleted the saas-16.3-15.0-perf-again-lul-reOe-fw branch December 19, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants