Repository navigation
Conversation
Rom1-B
requested review from
a team,
Herafia,
Lainow and
jdurand-teclib
and removed request for
a team
November 19, 2026 09:43
Lainow
reviewed
Nov 20, 2026
Lainow
left a comment
Contributor
There was a problem hiding this comment.
The ORDERBY glpi_plugin_tag_tagitems.id in showTagDropdown() and getTagForEntityName() sorts the tags in the order they were added, not by id as before. (ORDERBY plugin_tag_tags_id).
| - Fix tags from rules not applied on ticket update | ||
| - Fix tags being removed when saving them on a closed ticket | ||
| - Improve performance: no more database queries on each page load, fewer queries when displaying an item with many tags, faster "Associated items" tab of a tag (new index on the tag of the links), lighter entity tags and tag save requests | ||
|
|
Contributor
There was a problem hiding this comment.
As we changed a public method signature, I think it should either be mentionned in the changelog or the former method name should be taged as "Deprecated"
Suggested change
| - Change public method PluginTagTag::getSingleTag($tag_id, $separator = '') to private method PluginTagTag::renderSingleTag(array $tag_data): string |
Contributor
Author
There was a problem hiding this comment.
In plugins, we do not indicate when a method is deprecated, unlike in the core, because these methods are not reused in other plugins.
MyvTsv
force-pushed
the
perf_optimization
branch
from
November 25, 2026 14:21
91c6d00 to
9b486d9
Compare
jdurand-teclib
previously approved these changes
Nov 26, 2026
Lainow
previously approved these changes
Nov 26, 2026
MyvTsv
force-pushed
the
perf_optimization
branch
from
December 1, 2026 09:35
a33c8ba to
d79088f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Performance pass on the tag plugin, measured on a seeded e2e database (2,000 tickets, 2,000 computers, 1,000 tags, 50,238 tag links; hot items carrying 600 tags, one tag linked to 2,032 items).
Server time of the "Associated items" tab: 115 → 62 ms (significant over 5 runs). Other page timings are within run-to-run noise on a local database; the query reductions matter most on a remote database.
Changes
Plugin::isPluginActive()database lookups and no configuration read on every request (Plugin::getPlugins()with a fallback when no plugin is booted); the tags location is read only when a form can show tags.getFromDB()per tag; no query for new items; the available tags are memoized per search criteria for the request.canItemtype(): the itemtypes of active tags are read once per request (reset on tag add/update/purge, migration, uninstall).plugin_tag_tags_idkey onglpi_plugin_tag_tagitems(install and migration), used by every lookup by tag.deleteByCriteria().PluginTagTag::getSingleTag()was removed (no remaining caller).Tests
TagTestCase::setUp()resets the memoized values between tests.Screenshots (if appropriate):