Re: [flexcoders] ADG Memory leak.

2009-04-01 Thread Adrian Williams

Hi All,

   Here is the Adobe bug that this issue is attached to, including the 
test case I mentioned (though it returns super() vs. .this) ...as of 
this morning, they have the bug marked as fixed/resolved in changelist 
227803. 


   http://bugs.adobe.com/jira/browse/FLEXDMV-1968

Best,
Adrian

Tom Chiverton wrote:


On Monday 23 Mar 2009, Adrian Williams wrote:
 a sieve. And as an experiment, we setup a custom renderer that simply
 returned .this and it leaked like crazy. We have a fairly large ADG
 (100+ columns) and every time we'd scroll right to see more columns,

Could you attach this as a test case to an issue in the DMV project on
bugs.adobe.com ?

--
Tom Chiverton
Helping to continuously mesh compelling e-tailers as part of the IT 
team of

the year, '09 and '08




This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in 
England and Wales under registered number OC307980 whose registered 
office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, 
Manchester, M3 3EB. A list of members is available for inspection at 
the registered office together with a list of those non members who 
are referred to as partners. We use the word ?partner? to refer to a 
member of the LLP, or an employee or consultant with equivalent 
standing and qualifications. Regulated by the Solicitors Regulation 
Authority.


CONFIDENTIALITY

This email is intended only for the use of the addressee named above 
and may be confidential or legally privileged. If you are not the 
addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents. If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 2500.


For more information about Halliwells LLP visit www.halliwells.com 
http://www.halliwells.com/.




Re: [flexcoders] ADG Memory leak.

2009-03-23 Thread Adrian Williams

Hi Wesley,

   We work with ADG's extensively including some intense custom 
renderers and have had horrible problems with memory leaks.  Turns out, 
there are known problems with the ADG's internal renderers leaking like 
a sieve.  And as an experiment, we setup a custom renderer that simply 
returned .this and it leaked like crazy. We have a fairly large ADG 
(100+ columns) and every time we'd scroll right to see more columns, 
more renderers would be created in addition to the one's already 
present...and scrolling back left would recreate them again instead of 
using the one's that had already been created...at one point, we had 
several hundred instances of renderers running for a single grid.  
Insanity! And, because the ADG and the DG are maintained by two separate 
teams at Adobe, one is not related to the other and in this case, the DG 
does not have the same leaks as the ADG.


   In the end, we had to write a serious piece of code to manage our 
renderers, which finally rid us of the leaks we were encountering.  I've 
been working on trying to encapsulate our logic so I can post it here as 
I know a lot of other folks have run into the same problems and could 
probably use the help.


Best,
Adrian

Wesley Acheson wrote:


I've wasted most of the day trying to figure out why my application 
was leaking memory.


 I was dynamically adding and removing columns from the 
AdvancedDataGrid. I noticed that it was slowing down a lot.  I 
naturally assumed that it was my custom item renderer and even after 
reading Alex's blog entry about using the profiler I couldn't figure 
out what was holding references to my item renderer.


 Anyway the error continued to happen after I commented out all the 
code in my item renderer.  I even changed it to subclass 
AdvancedDataGridItemRenderer, still no joy.  So I removed the custom 
item renderer and noticed that instead of my ItemRenderer the ADG 
didn't remove references to its own item renderer.


Anyway I changed to a standard DataGrid and all worked correctly.  The 
references were removed when garbage collection occurred I had to 
change my code a bit.


This isn't really a question more of a complaint really.  I don't know 
if it was my code or just a problem with the ADG though I suspect the 
latter.


A couple of things I noticed with the standard DG.  Firstly if setting 
the itemrenderer on the DG itself it also uses the same ItemRenderer 
on the header rows.  Is this correct behaviour.  Setting the 
ItemRenderer on the column seems to keep the normal header renderer.  
This I admit has me confused is this the way its supposed to work?  
How would I set all the cells to a custom IR and leave the headers 
alone?  It seems inconsistent.


I have read the excellent Articles on Alex's blog.

Anyway that's all.

Regards,

Wes




Re: [flexcoders] ADG Memory leak.

2009-03-23 Thread Tom Chiverton
On Monday 23 Mar 2009, Adrian Williams wrote:
 a sieve.  And as an experiment, we setup a custom renderer that simply
 returned .this and it leaked like crazy. We have a fairly large ADG
 (100+ columns) and every time we'd scroll right to see more columns,

Could you attach this as a test case to an issue in the DMV project on 
bugs.adobe.com ?

-- 
Tom Chiverton
Helping to continuously mesh compelling e-tailers as part of the IT team of 
the year, '09 and '08



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

Re: [flexcoders] ADG Memory leak.

2009-03-23 Thread Wesley Acheson
Thanks Adrian

On Mon, Mar 23, 2009 at 1:55 PM, Adrian Williams
adri...@familytreedna.comwrote:

  Hi Wesley,

 We work with ADG's extensively including some intense custom renderers
 and have had horrible problems with memory leaks.  Turns out, there are
 known problems with the ADG's internal renderers leaking like a sieve.  And
 as an experiment, we setup a custom renderer that simply returned .this and
 it leaked like crazy. We have a fairly large ADG (100+ columns) and every
 time we'd scroll right to see more columns, more renderers would be created
 in addition to the one's already present...and scrolling back left would
 recreate them again instead of using the one's that had already been
 created...at one point, we had several hundred instances of renderers
 running for a single grid.  Insanity! And, because the ADG and the DG are
 maintained by two separate teams at Adobe, one is not related to the other
 and in this case, the DG does not have the same leaks as the ADG.

 In the end, we had to write a serious piece of code to manage our
 renderers, which finally rid us of the leaks we were encountering.  I've
 been working on trying to encapsulate our logic so I can post it here as I
 know a lot of other folks have run into the same problems and could probably
 use the help.

 Best,
 Adrian

 Wesley Acheson wrote:

  I've wasted most of the day trying to figure out why my application was
 leaking memory.

  I was dynamically adding and removing columns from the AdvancedDataGrid. I
 noticed that it was slowing down a lot.  I naturally assumed that it was my
 custom item renderer and even after reading Alex's blog entry about using
 the profiler I couldn't figure out what was holding references to my item
 renderer.

  Anyway the error continued to happen after I commented out all the code in
 my item renderer.  I even changed it to subclass
 AdvancedDataGridItemRenderer, still no joy.  So I removed the custom item
 renderer and noticed that instead of my ItemRenderer the ADG didn't remove
 references to its own item renderer.

 Anyway I changed to a standard DataGrid and all worked correctly.  The
 references were removed when garbage collection occurred I had to change my
 code a bit.

 This isn't really a question more of a complaint really.  I don't know if
 it was my code or just a problem with the ADG though I suspect the latter.

 A couple of things I noticed with the standard DG.  Firstly if setting the
 itemrenderer on the DG itself it also uses the same ItemRenderer on the
 header rows.  Is this correct behaviour.  Setting the ItemRenderer on the
 column seems to keep the normal header renderer.  This I admit has me
 confused is this the way its supposed to work?  How would I set all the
 cells to a custom IR and leave the headers alone?  It seems inconsistent.

 I have read the excellent Articles on Alex's blog.

 Anyway that's all.

 Regards,

 Wes



 



[flexcoders] ADG Memory leak.

2009-03-20 Thread Wesley Acheson
I've wasted most of the day trying to figure out why my application was
leaking memory.

 I was dynamically adding and removing columns from the AdvancedDataGrid. I
noticed that it was slowing down a lot.  I naturally assumed that it was my
custom item renderer and even after reading Alex's blog entry about using
the profiler I couldn't figure out what was holding references to my item
renderer.

 Anyway the error continued to happen after I commented out all the code in
my item renderer.  I even changed it to subclass
AdvancedDataGridItemRenderer, still no joy.  So I removed the custom item
renderer and noticed that instead of my ItemRenderer the ADG didn't remove
references to its own item renderer.

Anyway I changed to a standard DataGrid and all worked correctly.  The
references were removed when garbage collection occurred I had to change my
code a bit.

This isn't really a question more of a complaint really.  I don't know if it
was my code or just a problem with the ADG though I suspect the latter.

A couple of things I noticed with the standard DG.  Firstly if setting the
itemrenderer on the DG itself it also uses the same ItemRenderer on the
header rows.  Is this correct behaviour.  Setting the ItemRenderer on the
column seems to keep the normal header renderer.  This I admit has me
confused is this the way its supposed to work?  How would I set all the
cells to a custom IR and leave the headers alone?  It seems inconsistent.

I have read the excellent Articles on Alex's blog.

Anyway that's all.

Regards,

Wes