Skip to content

B2: isHoliday() runs two queries per day checked #13

Open

Description

@caseysoftware

With manual holidays enabled, every isHoliday() call runs two queries (blacklist, then whitelist). Core calls it once per calendar cell (about 730 queries on the year view) and once per day inside calcFinish() / calcDuration() loops.

Fix: load the non-working and extra-working dates for a year (or the requested span) once per request and answer from memory.

Files: holiday_functions.class.php L54–130

Evidence: found by reading the code against master; not reproduced on a running install.
Effort: S

Part of #1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions