odoo / o-spreadsheet

Other
180 stars 39 forks source link

[FW][REV] chart: avoid useless chart updates #4602

Closed fw-bot closed 3 weeks ago

fw-bot commented 3 weeks ago

Description

This reverts commit 6eb43533d.

It turns out that checking the deep equality of runtime while ignoring functions is not a good fix to avoid useless chart updates. The problem is that some runtime changes apply only to the callbacks (eg. changing the dataset format only change the ticks callback).

The only real alternative would be to add the variables that are used in the callbacks to the runtime, so the deepEquals would work. But this is very error prone: we'll 100% forget to add a variable at some point.

So we will accept the useless updates for now, until we see a real performance issue.

Task: : 4029016

review checklist

Forward-Port-Of: odoo/o-spreadsheet#4572

robodoo commented 3 weeks ago

Pull request status dashboard

fw-bot commented 3 weeks ago

@hokolomopo @LucasLefevre cherrypicking of pull request odoo/o-spreadsheet#4572 failed.

stdout:

Auto-merging src/components/figures/chart/chartJs/chartjs.ts
CONFLICT (content): Merge conflict in src/components/figures/chart/chartJs/chartjs.ts
Auto-merging tests/figures/chart/charts_component.test.ts
CONFLICT (content): Merge conflict in tests/figures/chart/charts_component.test.ts

stderr:

15:38:59.326307 git.c:463               trace: built-in: git cherry-pick 2dbdd75c56894fee7ca1dbadfcda0e003ad42dbd --strategy ort
error: could not apply 2dbdd75c5... [REV] chart: avoid useless chart updates
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.

:warning: after resolving this conflict, you will need to merge it via @robodoo.

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

hokolomopo commented 3 weeks ago

@robodoo r+