Open Piwaii opened 1 year ago
Sorry to hear that @Piwaii,
Can you provide the data you used for the testing? I am interested in the complexity of the input.
We are currently working on the replacement for rich text resolution to unify the capabilities. Would you be willing to try to render your data using Ritch text resolver?
An example of use could be seen in the README of the linked repository, or on https://github.com/Simply007/kontent-starter-corporate-next-js/blob/main/src/components/RichText.js.
Indeed this new lib is very efficient :
rendering 74730 characters
- before was resolved in 22271ms with createRichTextObjectResolver()
- now is resolved in 8ms with nodeParse()
we will definitely follow this new repo :)
thank you very much @Simply007
Thanks for sharing the result! It looks awesome.
Parsing seems very efficient. Have you just parsed the input, or also used the resolution library (i,e, linked https://www.npmjs.com/package/@portabletext/react)?
We measured only the parsing
An example of use could be seen in the README of the linked repository, or on https://github.com/Simply007/kontent-starter-corporate-next-js/blob/main/src/components/RichText.js.
This is great - thank you. Is there an example of this using TypeScript? Adds an extra layer of complexity :-p
I'm looking into implementing a simpler (RegEx & replace) based solution in this SDK as a replacement for the browser / parse5 parser that this SDK currently uses. I've implemented it in another project already and saw a huge improvement in speed.. what took 1 minute using the node.js parser now takes under a second in new implementation.
I'm hoping to look into this in near future, but can't promise anything just yet ;)
Brief bug description
We are rendering a big article with markup (56000 characters) using
createRichTextObjectResolver
and it takes more than 25 seconds to answer.Repro steps
createRichTextObjectResolver
Expected behavior
Event if it's a big article, it should render in a reasonable time (avoiding possible timeouts)
Test environment
Additional context
We tested it in a little project (repo can be shared on demand) and the results are these :