MuhammaraJS
MuhammaraJS copied to clipboard
Any idea to modify recrypt function as a promise based one? currently It's blocking the event loop!
When trying to use recrypt function to encrypt a pdf on server, no other request is getting processed
can you try to use this: https://github.com/julianhille/MuhammaraJS/issues/92#issuecomment-871671379
this works with streams but im unsure if this unblocks the event loop
Tried that, but still, my event loop is blocking :-[
I'll have a look at it.
i digged a bit deeper and the blocking is not from js itself.
The cpp code of PDFDocumentCopyingContext
and then WriteNewObjects
and a foor loop.
I don't think this is possible to rewrite as promise without a major rewrite of the underlying cpp code.
Maybe worker threads or multi processing will solve your problem
Can you give me a small sample snippet to reproduce? An oddly huge pdf i could find myself. 😂
Update: i've got some idea and will try that.
Any solution about this? Which recrypt will block the whole nestjs backend
@zhuxb711 do you have any updates on this
@xLEpEX Use "Threadz" to run it on another thread