-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Potential performance improvement: Turn partial publish into full publish if outcome is the same #5303
Comments
Funnily after thinking about this #5301 doesnt really solve this case really. As a full publish will with that pr also do the simulation and apply the commands. We only said "do a full publish by emitting And just for completeness with #5385 will the |
Reverts d2d9faa partially Initially this change was done to fix neos#5303 But that was a hoax see neos#5303 (comment) we always emit the `WorkspaceWasPublished` event and this just simplifies the code-path again. For the discard all case, the code is stil a little easier to read _with_ the condition.
I don't know who said that, but it wasn't me. My point was: If is much easier to reason about the events if we can eliminate the last case of:
That would be the great ofc, but I really don't understand how #5385 is supposed to work. And IMO the difference between a partial and a full publish has a different meaning and should not be distinguished just by some metadata |
Reverts 05d6d5a partially Initially this change was done to fix #5303 But that was a hoax see neos/neos-development-collection#5303 (comment) we always emit the `WorkspaceWasPublished` event and this just simplifies the code-path again. For the discard all case, the code is stil a little easier to read _with_ the condition.
Just to close this up: The partial distinction is now still made via flag: #5385 (comment), but there is no performance gain whatsoever - as we changed the rules of publish and made PublishAll equally slow as PublishPartially :D |
TL;DR: A partial publish is much slower and more complex than a full publish of a workspace – we can detect if a partial publish already contains all pending events and turn it into a full publish in this case.
For Neos the default publishing mode is to only publish events of the currently selected document (IMHO a full publish should be the default but that discussion is out of scope!).
A partial publish is much more complex than a full publish because we first have to split affected and remaining events and publish those to different newly forked streams...
During the splitting of those events we could handle the
PublishIndividualNodesFromWorkspace
like the correspondingPublishWorkspace
command if$remainingCommands
is empty.The same should be true for
DiscardIndividualNodesFromWorkspace
vsDiscardWorkspace
Related: #4388
The text was updated successfully, but these errors were encountered: