Memory leak SF BO with DevExpress ASPxDataGridView


Author
Message
ChanKK
ChanKK
Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi,

I am facing memory leak problem when using SF BusinessObject and DevExpress ASPxDataGridView.

I have simple test project, which only has one BO, bind to ASPxDataGridView. It does nothing complicated, just load all records in Page_Load if not IsPostBack.



I found that, the memory usage would become double when I just "refresh" the page. I also used dotTrace profiler and found that # of BO instances keep increasing. I suspect it is the same issue with the post http://forum.strataframe.net/Topic20903-8-1.aspx.



I have prepared sample project and the dotTrace memory profiler files for your reference. MemoryLeak1.dtm is first load memory snapshot and MemoryLeak2.dtm is 2nd snapshot after refresh.



As the file size > 30MB, please download it from http://www.visualsolutions.com.my/blog/chankk/WebApplication6.zip



Hope you could get back to me as soon as possible! It is very urgent!



Thank you
Replies
ChanKK
ChanKK
Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)Advanced StrataFrame User (622 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
hi
any timeline?
may i know no update mean what?
haven't test, don't know the root cause yet, don't know solution yet or no plan to fix it?

My customers just can't keep waiting endless. We need at least a workaround.

This issue has been reported for more than a month, hope SF team understand our difficulty as well.

Thank you
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
may i know no update mean what?haven't test, don't know the root cause yet, don't know solution yet or no plan to fix it?


None of the alternatives. It just means I haven't been updated on it.

My customers just can't keep waiting endless. We need at least a workaround.


That is understandable, but I need to remind you, as I have done before, that this has been considered an ASP.NET issue by your other third party grid vendor, which even openly stated that it wouldn't fix it, and what our developing team will try is to find you a workaround, if possible. All I know is that it is on their list.

This issue has been reported for more than a month, hope SF team understand our difficulty as well.


Yep, we all do and appreciate your business, and will try to help you as soon as possible, I am sure about it.

Cheers.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I thought that I close out this post as email was used to work through this process. 

There were a lot of posts here and so it is just a matter of time before people look back here for a solution.  In short, we have gone through this thoroughly and sufficiently proven that StrataFrame doesn't have a memory leak.  There was, however, a valid issue that this customer was dealing with in regards to a memory leak and a DevExpress grid.  Below are two memory profiles, one with a DevExpress grid and another with a standard GridView:

DevExpress Web Grid Memory Profile
http://forum.strataframe.net/Uploads/Images/2c06d1b4-7887-451e-b52a-78db.png
(Download the attachment for a better look)

The DevExpress web grid does have many objects still in memory as part of this process.  In most cases, this would probably not cause an issue as the "leak" was negligible.  But if you are retrieving a very large data set and dealing with many records, then this could be an issue.  Also, the more records that are in the data set, the DevExpress.Web.ASPxClasses (Display Classes) that will be created, thus increasing memory size.  This not not a fault of DevExpress, but more of an attribute to the complexity and functionality of their control.

GridView Memory Profile
http://forum.strataframe.net/Uploads/Images/be40a39e-b788-4de8-88d0-2e29.png
(Download the attachment for a better look)

In this example, the same test was performed.  A new property called AutoDisposeHandlersAndObjects was added to the WebBusinessBindingSource that allows the control to clean up automatically.  Though this can be used on the GridView and several others that have been tested (i.e. Infragistics), this will not work with the DevExpress Web Grid as the way that they enumerate the underlying data source prevents certain disposals from taking place, though the instance never grew past 1 BBS in our testing.  That said, you can see that in the GridView test, there are no BBS references remaining and the environment is much cleaner.  This is not a criticism of DevExpress web grid by any means, just an observation, as the GridView doesn't have the "pre-built" logic the DevExpress grid does.  But the BBS can be released as part of the process.

Closing
In closing, we are not saying that there is a bug in the DevExpress Web Grid, just noting some possible issues that you may run into during development.  If there were a bug, it would be in ASP.NET most likely anyway.  If nothing else, there could be some philosophical differences here in dealing with large data sets within a grid and/or how to enumerate the underlying data source.  DevExpress has many great tools and products and we highly recommend them, but like any development cycle, each project should be evaluated to see if a particular control will meet the needs for specific intents and purpose.  So this is just to make you aware of any possible issues that may be encountered when using a StrataFrame BBS and a DevExress Web Grid.

Attachments
DevEx_WebGrid_MemProfile.png (190 views, 29.00 KB)
GridView_MemProfile.png (200 views, 13.00 KB)
Edited 14 Years Ago by Trent L. Taylor
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
                         Hi,
May I know any update? Do you think it could be solved in...
ChanKK - 16 Years Ago
                             We are looking at this right now and trying to reproduce. Should know...
Trent L. Taylor - 16 Years Ago
                                 Just FYI, your sample is missing the BusinessobjectLibrary6 project....
Trent L. Taylor - 16 Years Ago
                                     Hi,
I have attached the missing project.
Beside, I spent...
ChanKK - 16 Years Ago
                                     Sorry that this has taken so long, but in this instance, there is no...
Trent L. Taylor - 16 Years Ago
                                         Hi,
Shall you please test using DevExpress 8.2?
I will ask...
ChanKK - 16 Years Ago
                                         [quote][b]Trent L. Taylor (03/18/2009)[/b]

Finally, the...
ChanKK - 16 Years Ago
                                             That particular method doesn't play into this. However, we have made a...
Trent L. Taylor - 16 Years Ago
                                                 Hi,
I have tested with the fix you sent, but when refresh the...
ChanKK - 16 Years Ago
                                                     Sorry, this exception was easily reproducable and we already have a...
Trent L. Taylor - 16 Years Ago
                                                         Hi,
I tested it and it fixed the problem. I will release it to...
ChanKK - 16 Years Ago
                                         Hi,
After some more testing, I still found "memory leak". When I...
ChanKK - 16 Years Ago
                                             Chan, The screen shot you provided doesn't do me any good. We have...
Trent L. Taylor - 16 Years Ago
                                                 Hi,
OK, I will prepare sample for it.

However, I would...
ChanKK - 16 Years Ago
                                                     [quote]Does 1.6.6.9 include the memory leak fix as well?[/quote] Yes....
Trent L. Taylor - 16 Years Ago
                                                         Hi,
I have created sample project, which is exactly the same as...
ChanKK - 16 Years Ago
ChanKK - 16 Years Ago
Trent L. Taylor - 16 Years Ago
ChanKK - 16 Years Ago
ChanKK - 16 Years Ago
ChanKK - 16 Years Ago
                         Chan, We have looked at this from a number of angles. I am at a loss...
Trent L. Taylor - 16 Years Ago
                             Hi,
I hope you do not misunderstand me, I do appreciate SF help...
ChanKK - 16 Years Ago
                             Hi,
[quote]Some of your issues are coming from retrieving vast...
ChanKK - 16 Years Ago
                                 Chan, I appreciate your comments. We too appreciate you and your...
Trent L. Taylor - 16 Years Ago
                                     Hi,
Any status?

Beside, as promised I have downloaded...
ChanKK - 16 Years Ago
                                         Hi,
BTW, the error posted just now happen to all page that...
ChanKK - 16 Years Ago
                                             Sorry, one more week past. Any update?

Thank you
ChanKK - 16 Years Ago
                                                 Chan, We have not reproduced your memory leak as we had mentioned in...
Trent L. Taylor - 16 Years Ago
                                                     Hi,
As mentioned in PM, the actual problem of Save transaction is...
ChanKK - 16 Years Ago
                                                         Hi,
After further thinking, don't feel loCommand =...
ChanKK - 16 Years Ago
                                                             Agreed. The Clone should not cause an issue as it creates a unique...
Trent L. Taylor - 16 Years Ago
                                                                 Hi,
Any hint how to troubleshoot on this?

Thank you
ChanKK - 16 Years Ago
                                                                     Well, this thread is getting a bit ambiguous. I was just commenting on...
Trent L. Taylor - 16 Years Ago
                                     Hi,
After some further testing, I think I found the root cause of...
ChanKK - 16 Years Ago
                                         Glad you found a solution. We will take this post into consideration...
Trent L. Taylor - 16 Years Ago
ChanKK - 15 Years Ago
Trent L. Taylor - 15 Years Ago
Trent L. Taylor - 15 Years Ago
Trent L. Taylor - 15 Years Ago
ChanKK - 15 Years Ago
Trent L. Taylor - 15 Years Ago
ChanKK - 15 Years Ago
ChanKK - 15 Years Ago
Ivan George Borges - 15 Years Ago
ChanKK - 15 Years Ago
Ivan George Borges - 15 Years Ago
                         Hi Could you reproduce the memory leak issue? I need solution ASAP....
ChanKK - 15 Years Ago
                             Sorry Chan, not yet.
Ivan George Borges - 15 Years Ago
ChanKK - 15 Years Ago
ChanKK - 15 Years Ago
Ivan George Borges - 15 Years Ago
ChanKK - 15 Years Ago
Ivan George Borges - 15 Years Ago
                         [quote][b]Ivan George Borges (10/29/2010)[/b][hr]Hi Chan. Well,...
ChanKK - 15 Years Ago
                             Thanks for posting, Chan. I will reproduce here just in case we loose...
Ivan George Borges - 15 Years Ago
ChanKK - 15 Years Ago
Ivan George Borges - 15 Years Ago
ChanKK - 15 Years Ago
             Not yet, Chan.
Ivan George Borges - 15 Years Ago
ChanKK - 15 Years Ago
ChanKK - 15 Years Ago
Ivan George Borges - 15 Years Ago
ChanKK - 15 Years Ago
Ivan George Borges - 15 Years Ago
     any updates??
ChanKK - 15 Years Ago
             No Chan, not yet.
Ivan George Borges - 15 Years Ago
ChanKK - 15 Years Ago
Ivan George Borges - 15 Years Ago
Trent L. Taylor - 14 Years Ago
ChanKK - 14 Years Ago
Trent L. Taylor - 14 Years Ago
ChanKK - 14 Years Ago
ChanKK - 14 Years Ago
Trent L. Taylor - 14 Years Ago
ChanKK - 14 Years Ago
ChanKK - 14 Years Ago
ChanKK - 14 Years Ago
Trent L. Taylor - 14 Years Ago
ChanKK - 14 Years Ago
ChanKK - 14 Years Ago
Trent L. Taylor - 14 Years Ago
ChanKK - 14 Years Ago
Trent L. Taylor - 14 Years Ago
ChanKK - 14 Years Ago
Trent L. Taylor - 14 Years Ago
Peter Jones - 14 Years Ago
ChanKK - 14 Years Ago
ChanKK - 14 Years Ago
ChanKK - 14 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search