Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Dec 2010 at 22:16 UTC
Updated:
19 Feb 2011 at 16:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
mikeytown2 commentedOutput:
test code below
Comment #2
mikeytown2 commentedComment #3
mikeytown2 commentedThis solves one of the issues; going to dig into execute() next
Comment #4
mikeytown2 commentedHas recursion in it, so my guess is it doesn't get destroyed correctly
Patch below fixes pre_execute(); still no solution to execute() leaking.
Comment #5
mikeytown2 commentedScreen shot showing the before and after on one of our servers. This patch helps a lot; but it could use more help.
Comment #6
mikeytown2 commentedCalling this instead of destroy()
These are the objects with a destroy method
I've commented out views destroy() will try the rest and go from there.
Comment #7
mikeytown2 commentedAlt with a limit of 1000 in depth and it still doesn't clear out the memory; in fact I see no change in comparison.
Comment #8
mikeytown2 commentedall objects inside the view
Comment #9
merlinofchaos commentedDid you learn any more about the possible memory leaks?
It might be worth doing some more focused testing. For example, do just init_display() and then destroy. Do just init_handlers() then destroy. Do just build() without execute, then destroy. That might narrow down, a little, where to look?
Comment #10
mikeytown2 commentedThanks for the pointers :) Attach_displays leaks; Here is the line in question
http://drupalcode.org/viewvc/drupal/contributions/modules/views/includes...
Comment #11
mikeytown2 commentedpinpointed it further; its in class views_plugin_display_feed; attach_to method.
http://drupalcode.org/viewvc/drupal/contributions/modules/views/plugins/...
Comment #12
merlinofchaos commentedAhh! The clone isn't getting destroyed. Does adding $clone->destroy() there fix it? Break attachments?
Comment #13
mikeytown2 commentedFixes memory leak!
This patch should get some testing before getting committed. Views still works from my point of view with the patch applied.
Comment #14
merlinofchaos commentedNeed to ensure this doesn't break anything. bojanz, would you do some testing please?
Comment #15
dawehnerHere is a rerole for 6.x-3.x with a test for view::destroy
Comment #16
dawehnerUpdated test
Comment #17
merlinofchaos commentedCommitted to 2.x and 3.x -- needs porting to 7.x. SHould be easy.
Comment #18
dawehnerThis problem was just a previous codestyle fix :(
Commited to the 7.x branch.