You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the TagFactory does always request the Tags here and as the query is based on "name" instead of "ids" doctrine will not use its internal cache for it:
For performance reasons e.g. imports this is not very good maybe we can introduce simple memory based cache e.g.:
// after query resultforeach ($resultas$tag) {
$this->tags[$tag->getName()] = $tag;
}
// after new tag created also add it to the array$this->tags[$tag->getName()] = $tag;
So we can only query the not yet found tags.
Open Question:
Need this cache be invalidated?
Edge Case in the same process a Tag is removed
EntityManager is cleared (which happens mostly in imports) to clear memory (alternative cache just "id" of the tag instead of the whole object this would keep the memory very low)
The text was updated successfully, but these errors were encountered:
alexander-schranz
added
Performance
Problems with performance
Bug
Error or unexpected behavior of already existing functionality
and removed
Bug
Error or unexpected behavior of already existing functionality
labels
Jan 8, 2021
Currently the TagFactory does always request the Tags here and as the query is based on "name" instead of "ids" doctrine will not use its internal cache for it:
https://github.com/sulu/SuluContentBundle/blob/0.4.0/Content/Infrastructure/Doctrine/TagFactory.php#L45-L50
For performance reasons e.g. imports this is not very good maybe we can introduce simple memory based cache e.g.:
So we can only query the not yet found tags.
Open Question:
The text was updated successfully, but these errors were encountered: