Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
f69ee075
Commit
f69ee075
authored
Mar 17, 2023
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: Improve perfomance
parent
859aad11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
...PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
+16
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
...athTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
View file @
f69ee075
...
...
@@ -104,11 +104,17 @@
extended_search_mapping
:
{},
graph_gadget
:
"
unsafe/gadget_field_graph_echarts.html
"
},
/*
performance_mapping = {
performance_mapping
=
{
"
translated_simulation_state_title
"
:
[
"
simulation_state
"
,
"
getTranslatedSimulationStateTitle
"
],
"
translated_validation_state_title
"
:
[
"
validation_state
"
,
"
getTranslatedValidationStateTitle
"
],
"
translated_causality_state_title
"
:
[
"
causality_state
"
,
"
getTranslatedCausalityStateTitle
"
]
},
*/
},
domain_list
,
i
,
j
;
...
...
@@ -123,16 +129,20 @@
group_by
=
options
.
group_by
;
}
/* XXX - Improve the perfomance changing the parameter in the select_list is not working properly
For example, use getTranslatedSimulationStateTitle instead of translated_simulation_state_title
/* Replace the key (group_by) using performance_mapping to use SQL indexes in a more efficient way.
Group by translated_simulation_state_title will increase the number of SQL join.
For example, use getTranslatedSimulationStateTitle and simulation_state instead of
translated_simulation_state_title
*/
/*
for (i = 0; i < group_by.length; i += 1) {
for
(
i
=
0
;
i
<
group_by
.
length
;
i
+=
1
)
{
if
(
performance_mapping
.
hasOwnProperty
(
group_by
[
i
]))
{
options
.
layout
.
x
.
key
=
performance_mapping
[
group_by
[
i
]][
1
];
data
.
x
=
options
.
layout
.
x
.
key
;
group_by
[
i
]
=
performance_mapping
[
group_by
[
i
]][
0
];
}
}
*/
}
data
.
y
=
"
count(*)
"
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
View file @
f69ee075
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1007.
6054.5919.58094
</string>
</value>
<value>
<string>
1007.
7141.47221.20428
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
16790
02058.79
</float>
<float>
16790
67473.94
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment