Skip to content
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

Performance ESCR tests. Disabling Neos.Neos catchUpHooks speeds up tests #4878

Closed
mhsdesign opened this issue Feb 7, 2024 · 2 comments · Fixed by #4904
Closed

Performance ESCR tests. Disabling Neos.Neos catchUpHooks speeds up tests #4878

mhsdesign opened this issue Feb 7, 2024 · 2 comments · Fixed by #4904
Labels

Comments

@mhsdesign
Copy link
Member

mhsdesign commented Feb 7, 2024

Related: #4750

running

composer run test:behat-cli -- -c 'Neos.ContentRepository.BehavioralTests/Tests/Behavior/behat.yml.dist'

takes 28 seconds currently.

When disabling the unneeded (for those tests) RouterCacheHookFactory and GraphProjectorCatchUpHookForCacheFlushingFactory neos hooks it improves to 21 seconds.

And also excluding the PendingChangesProjection will make it to about 19 seconds.

@mhsdesign mhsdesign changed the title Performance ESCR tests. Disabling Neos.Neos catchUpHooks speeds tests Performance ESCR tests. Disabling Neos.Neos catchUpHooks speeds up tests Feb 7, 2024
@kitsunet
Copy link
Member

kitsunet commented Feb 7, 2024

Fine for me, the question is at what point the tests are no longer representative of the real world. Does the hook have dedicated tests for example?

@mhsdesign mhsdesign added the 9.1 label Feb 8, 2024
mhsdesign added a commit to mhsdesign/neos-development-collection that referenced this issue Feb 20, 2024
Resolves: neos#4878

by setting it to null or `~`

That for example allows to speed up local e2e tests by diabling certain neos specific projections:

```yaml
Neos:
  ContentRepositoryRegistry:
    presets:
      'default':
        projections:
          'Neos.Neos:DocumentUriPathProjection':
            catchUpHooks:
              'Neos.Neos:FlushRouteCache': ~
          'Neos.Neos:PendingChangesProjection': ~
          'Neos.ContentRepository:ContentGraph':
            catchUpHooks:
              'Neos.Neos:FlushContentCache': ~
          'Neos.Neos:AssetUsage': ~
```
@mhsdesign
Copy link
Member Author

With #4904 i allow a workaround to do this locally which seems fine for now?

Neos:
  ContentRepositoryRegistry:
    presets:
      'default':
        projections:
          'Neos.Neos:DocumentUriPathProjection':
            catchUpHooks:
              'Neos.Neos:FlushRouteCache': ~
          'Neos.Neos:PendingChangesProjection': ~
          'Neos.ContentRepository:ContentGraph':
            catchUpHooks:
              'Neos.Neos:FlushContentCache': ~
          'Neos.Neos:AssetUsage': ~

do you agree?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants