Skip to content

Perf profile rights and api calls - #173

Open
Herafia wants to merge 2 commits into
11.0/bugfixesfrom
perf_profile_rights_and_api_calls
Open

Herafia wants to merge 2 commits into
11.0/bugfixesfrom
perf_profile_rights_and_api_calls

Conversation

@Herafia

@Herafia Herafia commented Nov 17, 2026

Copy link
Copy Markdown
  • 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 %

@Herafia
Herafia changed the base branch from main to 11.0/bugfixes November 17, 2026 10:06
@Herafia Herafia self-assigned this Nov 17, 2026

@Lainow Lainow left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup.php:96: getPhpDir() is a filesystem path, it doesn't match /plugins/metabase/ URLs for marketplace installs, so the JS/CSS are no longer loaded. Match /plugins/metabase/ or drop this filter.
CI did not run on 6271f48, please re-trigger it.

@Herafia
Herafia requested a review from Lainow November 18, 2026 14:32
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.

2 participants