-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory leak with skin scripts #18
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 13370359216Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it also work to use aq_base(obj)? That might be slightly safer in case something doesn't have a meaningful repr
@davisagli I'd rather get an understanding of what its trying to do from someone who designed it. It seems to be a cache to prevent the more expensive looking up of if there is a matching override for this particular script.
|
@davisagli I think that it's also possible it would work the same if the key was the path of the script rather than the url path. |
At least using the (possibly persistent) object as a cache key is a no go. This is the entry to hell. It must be pure luck we had not any problems so far. . Good catch! I am just not sure if the |
@jensens @davisagli I've changed the key to the filesystem filename. I can't really think of a reason this is not ok but you guys might be able to. |
@davisagli is using plone as a test dependency ok? otherwise I'm struggling to come up with a test for skins |
Skins are actually a concept of CMFCore, so it should be enough for testing purposes. |
@jensens I already looked there. it doesn't test running a script. Only the skin name. So far I actually didn't find a test of the functionality of skins |
I tested it on the 5.0 site thats been giving me problems. collective.memleak seems to show its fixed this problem but annoyingly the topref counts in the zmi debug control panel still seem to show the objects are there which I can't explain. |
I understand, testing here is complex and there are no tests on this level available anyway. I would say it is save to merge this PR, since this is a very simple change. @djay please add an entry to the |
@jensens ok. Shame this also didn't fix my major memory leak like I thought it would :( |
@mauritsvanrees @ale-rt Could one of you also review this PR. I can create a release after merging it, if you think this PR is okay. Otherwise I'll create the release without this PR. |
Co-authored-by: Alessandro Pisa <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a suggestion :)
Co-authored-by: Alessandro Pisa <[email protected]>
No description provided.