Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039837
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Resource and Reservation Managementmajorhave not tried2018-12-19 13:532019-01-08 08:10
ReportercaristuView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision50b01843cbd7
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned ToSandrahuguet
Regression introduced in release
Summary

0039837: dateIsWorkday function performance should be improved

DescriptionWhen the resources calendar is drawn/redrawn, the dateIsWorkDay function[1] function is executed for every calendar cell to determine if they are available or not for entering reservations.

This impacts on the time spent to show/refresh the calendar

[1] https://code.openbravo.com/erp/pmods/org.openbravo.module.resources/file/tip/web/org.openbravo.module.resources/js/calendar/ob-resourcescalendar-widget.js#l1247 [^]
Steps To Reproduce1) Using Chrome's Performance profiler measure the times spent to load the resources and reservation calendar
2) Note that the most part of the time is spent in the dateIsWorkDay function.

Attached are some screenshots of the numbers retrieved with the profiler (when opening the resources calendar from a POS-Terminal).
TagsPerformance
Attached Filespng file icon callTree.png [^] (186,523 bytes) 2018-12-19 13:54


png file icon dateIsWorkDay.png [^] (187,376 bytes) 2018-12-19 13:57


png file icon dateIsWorkDay2.png [^] (217,241 bytes) 2018-12-19 13:57

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0108823)
hgbot (developer)
2019-01-04 08:30

Repository: erp/pmods/org.openbravo.module.resources
Changeset: 50b01843cbd7869e8d1a3e76dc4938ce6d1ab384
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Jan 03 18:32:06 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.resources/rev/50b01843cbd7869e8d1a3e76dc4938ce6d1ab384 [^]

Fixes Issue 39837:dateIsWorkday function performance should
be improved

Calendar Unavailability is fetched for date range in between
2 weeks in past and 4 weeks in the future. In case the date
is in between above range, short Array with less data is
sent to getDateTimeAvailabilityDuration.

---
M src/org/openbravo/module/resources/calendar/ReservationUtilities.java
M src/org/openbravo/module/resources/calendar/ResourcesCalendarActionHandler.java
M web/org.openbravo.module.resources/js/calendar/ob-resourcescalendar-widget.js
---
(0108824)
hgbot (developer)
2019-01-04 08:30

Repository: erp/pmods/org.openbravo.module.resources
Changeset: f82f8354ebc5f3f689648381630d43227db13863
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Fri Jan 04 08:19:06 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.resources/rev/f82f8354ebc5f3f689648381630d43227db13863 [^]

related to issue 39837 code review changes

*delete unused variable
*improve variable name
*use getFirstDayOfWeek

---
M src/org/openbravo/module/resources/calendar/ReservationUtilities.java
M web/org.openbravo.module.resources/js/calendar/ob-resourcescalendar-widget.js
---
(0108825)
Sandrahuguet (developer)
2019-01-04 08:38

Code review + testing OK
(0108849)
hgbot (developer)
2019-01-08 08:10

Repository: erp/pmods/org.openbravo.module.resources
Changeset: 6713158524b0feb5323d7348d5171356779002c0
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Jan 08 08:10:27 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.resources/rev/6713158524b0feb5323d7348d5171356779002c0 [^]

related to issue 39837 fixed jslint error

---
M web/org.openbravo.module.resources/js/calendar/ob-resourcescalendar-widget.js
---

- Issue History
Date Modified Username Field Change
2018-12-19 13:53 caristu New Issue
2018-12-19 13:53 caristu Assigned To => Triage Finance
2018-12-19 13:53 caristu Steps to Reproduce Updated View Revisions
2018-12-19 13:54 caristu Description Updated View Revisions
2018-12-19 13:54 caristu Steps to Reproduce Updated View Revisions
2018-12-19 13:54 caristu File Added: callTree.png
2018-12-19 13:54 caristu File Added: dateIsWorkDay2.png
2018-12-19 13:56 caristu Description Updated View Revisions
2018-12-19 13:57 caristu File Deleted: dateIsWorkDay2.png
2018-12-19 13:57 caristu File Added: dateIsWorkDay.png
2018-12-19 13:57 caristu File Added: dateIsWorkDay2.png
2018-12-19 17:40 dmitry_mezentsev Severity minor => major
2018-12-19 17:47 Sandrahuguet Tag Attached: Performance
2018-12-24 11:15 AtulOpenbravo Status new => scheduled
2018-12-27 16:30 Sandrahuguet Assigned To Triage Finance => AtulOpenbravo
2019-01-04 08:30 hgbot Checkin
2019-01-04 08:30 hgbot Note Added: 0108823
2019-01-04 08:30 hgbot Status scheduled => resolved
2019-01-04 08:30 hgbot Resolution open => fixed
2019-01-04 08:30 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.module.resources/rev/50b01843cbd7869e8d1a3e76dc4938ce6d1ab384 [^]
2019-01-04 08:30 hgbot Checkin
2019-01-04 08:30 hgbot Note Added: 0108824
2019-01-04 08:38 Sandrahuguet Review Assigned To => Sandrahuguet
2019-01-04 08:38 Sandrahuguet Note Added: 0108825
2019-01-04 08:38 Sandrahuguet Status resolved => closed
2019-01-08 08:10 hgbot Checkin
2019-01-08 08:10 hgbot Note Added: 0108849


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker