Commit eedb134
committed
[DRAFT]
from perf doc : https://github.com/chartjs/Chart.js/blob/b9c01414bac867310d192da676c78e8e269f7d8b/docs/general/performance.md?plain=1
PARSING:
we can optimize by removing parsing, if we send date in the valid format and ordered, we can set parsing to false and save some time
following the doc: https://www.chartjs.org/docs/latest/samples/bar/stacked-groups.html
and testing with (array of object (x, y) instead of array of int)
testing at odoo with parsing = false,
there is a small problem, i'm still looking why the count is not well displayed (fyi, it's well computed as you can see in the y axis)
Data normalization
when parsing, i used unique and sorted data, so it should work with normalized: true
Decimation (https://github.com/chartjs/Chart.js/blob/b9c01414bac867310d192da676c78e8e269f7d8b/docs/configuration/decimation.md)
can't be acheived as our labels are not linear or time, we use stages (string)
Disable Animations
for large data
i'm also wondering if we disable the view for large data. it doesn't make sense to show tens of thousands of data points on a graph that is only a few hundred pixels wide.
it was crushing, and sometimes loaded in 160 seconds, now it's done in around ~ 70 seconds, but as you can see it's not readable at all
I also found an open issue on github, and someone tried to solve it
https://github.com/chartjs/Chart.js/pull/11836
it's still not approved
i will need to test on a staging env (real data) to be coherent.1 parent 1affba5 commit eedb134
File tree
3 files changed
+11
-3
lines changed- addons/web/static
- lib/Chart
- src/views/graph
3 files changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8125 | 8125 | | |
8126 | 8126 | | |
8127 | 8127 | | |
8128 | | - | |
| 8128 | + | |
8129 | 8129 | | |
8130 | 8130 | | |
8131 | 8131 | | |
| |||
8141 | 8141 | | |
8142 | 8142 | | |
8143 | 8143 | | |
8144 | | - | |
| 8144 | + | |
8145 | 8145 | | |
8146 | 8146 | | |
8147 | 8147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
776 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
| |||
838 | 840 | | |
839 | 841 | | |
840 | 842 | | |
| 843 | + | |
841 | 844 | | |
| 845 | + | |
842 | 846 | | |
843 | 847 | | |
844 | 848 | | |
| |||
0 commit comments