plone / plone.restapi

RESTful API for Plone.
http://plonerestapi.readthedocs.org/
84 stars 73 forks source link

Added support for nested schemas with resolveuid block deserializer #1595

Closed JeffersonBledsoe closed 1 year ago

JeffersonBledsoe commented 1 year ago

As the initial implementation only iterated over the smart field, there may be a performance impact with this PR with very large blocks as there is no way of knowing if a nested value will have a smart field without iterating through them all. Any comments on this/ input on if this could be improved are welcomed!

Closes #1594

mister-roboto commented 1 year ago

@JeffersonBledsoe thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

netlify[bot] commented 1 year ago

Deploy Preview for plone-restapi processing.

Name Link
Latest commit 80e2597b41db5e851b77bd04346bba617864ae0d
Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/64067dbffe804a0008103ebf
netlify[bot] commented 1 year ago

Deploy Preview for plone-restapi canceled.

Name Link
Latest commit 59589976a3ba58743bbdcedcbd2828cf2e066fc9
Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/646383c0b937460008cf68bc
JeffersonBledsoe commented 1 year ago

@jenkins-plone-org please run jobs

JeffersonBledsoe commented 1 year ago

@tisto Thoughts on this? David expressed some concerns in #1594

JeffersonBledsoe commented 1 year ago

@jenkins-plone-org please run jobs

davisagli commented 1 year ago

@JeffersonBledsoe @razvanMiu I tested this with a large page from one of our projects and don't see any significant difference in performance.

I think sub-blocks will end up getting processed twice, since the (de)serializer will be called once for the subblock and again for the top-level block, and the second one will recurse down into the subblocks. That's not necessarily a problem, but could be optimized in the future.