featdd / dpn_glossary

Glossary extension for TYPO3
http://typo3.org/extensions/repository/view/dpn_glossary
GNU General Public License v2.0
20 stars 29 forks source link

[FEATURE] Use a simplified SimpleTerm-object for parser && lazy-loadi… #188

Closed julianhofmann closed 1 year ago

julianhofmann commented 1 year ago

…ng for relations in normal Term-object

Without lazy-loading an uncached rendering of the page will process all terms and trying to resolve all ObjectStorages. Even if there is no entry, this causes a SQL-request. As the normal has description and media as properties, there are too avoidable SQL-request per term. For getting the terms cachable in a transient backend, lazyloading is not allowed due to serialization. Thus a SimpleTerm-object has been introduced without description, media and some simple properties which is catchable.

Fixes: #187

featdd commented 1 year ago

Hi @julianhofmann,

thanks for your work, I'll check this out as soon as I find the time.

But may I ask if the separate SimpleTerm model had an impact on your benchmarks? You added @Extbase\ORM\Lazy although, shouldn't this do the trick or does it still slow down performance? (Just a "simplicity over complexity" thought)

Greetings Daniel

julianhofmann commented 1 year ago

Hi @featdd. Of course, you are allowed to ask. The answer was already part of the commit message ;) "For getting the terms cachable in a transient backend, lazyloading is not allowed due to serialization. Thus a SimpleTerm-object has been introduced without description, media and some simple properties which is catchable." We are using the CFs APCuBackend for getting the parser even faster. With lazy-loading properties, this was not possible.

featdd commented 1 year ago

Hi @julianhofmann,

sorry for the late response, this is now merged with some small adjustments here: 738d6c07bba8884271b0d93c7b7f218001416560

Thanks for your work.