[ANALYTICS-313] json data after formatting date and decimal must be cached Created: 03/Mar/21  Updated: 26/Mar/21  Resolved: 26/Mar/21

Status: Closed
Project: Analytics
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Bug Priority: Neutral
Reporter: Oanh Thai Hoang Assignee: Oanh Thai Hoang
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1d 2.55h
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2021-03-03 at 13.17.29.png     File execution-time.diff    
Issue Links:
Problem/Incident
is caused by ANALYTICS-304 Investigate how to format date and nu... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: UI/UX Dash improvements
Sprint: Add-Ons 60
Story Points: 5

 Description   

Steps to reproduce

  1.  Add log to see time execution for function createDashboardComponent. Ex: execution-time.diff. See img  
  2.  Add some widgets of matomo, google, adobe
  3. Restart the instance, open analytic app and drag drop 2 times 
  4. Comment the code #doDateOrDecimalNumberFormatting and repeat the step
  5. Compare 2 execution times. See the time executions of doDateOrDecimalNumberFormatting is bigger than 

Logs, screenshots, gifs...

Expected results

.. Justify non-trivial expectations with a link to a doc or a relevant discussion.

Actual results

// #doDateOrDecimalNumberFormatting is commented 
Execution time in milliseconds: 5340
Execution time in milliseconds: 61
Execution time in milliseconds: 76






// #doDateOrDecimalNumberFormatting is running
Execution time in milliseconds: 7756
Execution time in milliseconds: 7396
Execution time in milliseconds: 4187

Workaround

Development notes

 

https://git.magnolia-cms.com/projects/ADDON/repos/analytics/browse/magnolia-analytics-amcharts/src/main/java/info/magnolia/analytics/amcharts/vaadin/AmChartsComponent.java#109

 

The json after format date or decimal must be cached to improve performance of loading



 Comments   
Comment by Michael Duerig [ 04/Mar/21 ]

I'm not yet convinced that caching is the right solution. IMO the formatting alone should not slow this down by the amount observed and can be sped up?

Generated at Sun Feb 11 23:17:40 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.