Added support for including anon classes multiple times per execution#109
Merged
LukeTowers merged 2 commits intodevelopfrom Sep 1, 2022
Merged
Added support for including anon classes multiple times per execution#109LukeTowers merged 2 commits intodevelopfrom
LukeTowers merged 2 commits intodevelopfrom
Conversation
Member
|
@jaxwilko I reckon we don't need to treat concrete classes any differently from anonymous classes. You could probably just create a cached instance of those classes as well, then there's no need to keep checking if it's an object or not when retrieving from the cache. |
Member
Author
|
@bennothommo yeah, was just trying to reduce memory usage by holding class references rather than the objects where possible but I guess it shouldn't make a massive difference :) |
Member
|
@bennothommo I'd prefer not to, it's unnecessary memory usage to avoid having to initialize a new instance. I'm fine with this approach as it is. |
LukeTowers
reviewed
Sep 1, 2022
LukeTowers
approved these changes
Sep 1, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
require_oncewill fail to load anon classes on subsequent requests. This patch adds a caching layer that allows included classes and object to he held in memory and returned as needed