Skip to content

[main] Perf profile rights and api calls - #178

Draft
glpi-project[bot] wants to merge 1 commit into
mainfrom
forward-port/173-to-main
Draft

glpi-project[bot] wants to merge 1 commit into
mainfrom
forward-port/173-to-main

Conversation

@glpi-project

@glpi-project glpi-project Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Forward-port of #173 to main.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • Instance: GLPI 11.0 (e2e environment), metabase 1.4.3, debug mode off
  • Data: 1 000 Metabase dashboards, 50 collections, 2 000 cards (Metabase API simulated with 20 ms per call), 50 profiles, 50 000 profile rights
  • Measured scenarios: central page, Metabase dashboard tab, profile rights tab, configuration tab, collections page, "Allow access to all"
  • Measurement method: median of 5 runs after a warm-up (browser Performance API); SQL from the MariaDB slow log at a zero threshold; API calls counted on the simulated Metabase
  • SQL: read the rights of a profile in one query and write only the changed rights; native checkboxes instead of 1 000 select2 dropdowns; rights sent as one field (the form failed with HTTP 400 beyond max_input_vars); cards fetched once on the collections page; no GET user/current before every API call (reconnect and replay once on 401); no isPluginActive() at init; assets on the plugin pages only

SQL Queries

Scenario Without plugin Before After Difference
Dashboard tab - 2 026 89 -95.6 %
Profile rights tab - 2 026 98 -95.2 %
Allow access to all (whole scenario) - 8 318 270 -96.8 %
glpi_plugins per request 8 12 10 -2

Response Times

Scenario Before After Difference
Profile rights tab, browser blocking time 17 384 ms 0 ms -100 %
Profile rights form saved with 1 000 dashboards (default PHP settings) HTTP 400 saved fixed
Collections page (server) 2 800 ms (111 API calls) 165 ms (4 API calls) -94.1 %
Dashboard tab (server) 118 ms 54 ms -54.7 %
Configuration tab (server) 290 ms 140 ms -51.8 %

@glpi-project

glpi-project Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin forward-port/173-to-main
git worktree add --checkout .worktree/forward-port/173-to-main forward-port/173-to-main
cd .worktree/forward-port/173-to-main
git reset --hard HEAD^
git cherry-pick -x 9a5eccdd248e292bf5d857e610d53708da562fbb

@glpi-project glpi-project Bot mentioned this pull request Nov 30, 2026
2 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant