On document creation the sync listener videoChangedListener is:
1. updating video metadata by processing the blob
2. it fires a videoChanged event that is catch by 2 other async listener
2.1 one is scheduling an async work for running the conversion work
2.2 the other is doing the storyboard in the async listener
This does not scale because:
- the sync listener is reading the blob and we don't want that to get hyper fast import the blob is already in the binarystore we just set a ref on it.
- there is 2 async listeners (converted in ListenerWork) one is just scheduling another work so a total of 3 works.
This flow might be ok for new document from the UI but for mass import we need to change it.
Just having a sync listener that is scheduling 2 works: a Storyboard and conversion.
Here is an impl:
https://github.com/nuxeo/nuxeo-platform-video/commit/e9b1a9ef99f38458dee8fbf54be3f18228a188a1
To use it:
<component name="b10b-video-config"> <require>org.nuxeo.ecm.platform.video.service.contrib</require> <require>org.nuxeo.platform.video.core.listeners</require> <!-- Replace the default sync listener that is slow and generate too much async works --> <extension target="org.nuxeo.ecm.core.event.EventServiceComponent" point="listener"> <listener name="videoChangedListener" enabled="false" /> <listener name="videoImportListener" async="false" postCommit="false" class="org.nuxeo.ecm.platform.video.listener.VideoImportListener" priority="20"> <event>documentCreated</event> </listener> </extension> </component>
- is duplicated by
-
NXP-22794 Make blob related processing asynchronous in videoChangedListener
- Resolved