-
Notifications
You must be signed in to change notification settings - Fork 351
[FEATURE] Added preload nodes #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR allows structure tags to be defined in the structure template file. These tags can subsequently be used by other bundles. It also removes the unique priority constraint on tags and adds an "addTag" method to the Property class.
$uuids[] = $row->getValue('page.jcr:uuid'); | ||
} | ||
|
||
$this->sessionManager->getSession()->getNodesByIdentifier($uuids); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a comment to indicate why we do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually reduce the number of queries? It should do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it reduces the number of queries ... but it doesnt look like a speed optimization (at least on my computer) but the advantage is that jackrabbit has not 100 queries (= for 100 pages!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment added
@dantleech @chirimoya getNodesByPath is much faster then getNodesByIdentifier. But there is a batch-size and current getNodesByPath loads only 50 nodes at once ... (jackalope/jackalope#239) this brings a big speed optimization |
…/enhanced-structure-tagging Conflicts: src/Sulu/Bundle/CoreBundle/Resources/config/content.xml
$this->languageNamespace | ||
); | ||
$url = $row->getValue('page.' . $property->getName()); | ||
$url = $this->getPropertyData($node, $property, $webspaceKey, $locale); | ||
} | ||
} | ||
|
||
try { | ||
$routePath = $row->getPath('route'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use $node->getResourceLocator
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not possible because then i have to load the whole structure!
…u into feature/preload-nodes Conflicts: src/Sulu/Component/Content/Mapper/ContentMapper.php
@chirimoya it has (nearly) no benefit for speed, but i think it is less load for jackrabbit!