Wrox Programmer Forums
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 4th, 2011, 12:45 PM
Authorized User
Join Date: Nov 2009
Posts: 31
Thanks: 3
Thanked 0 Times in 0 Posts
Question Array Size Limit Issue


I have used this framework in developing an online job search and recruitment system and number of users are growing day by day. I have now 11336 users in ENTUserAccount table with candidate role. I am now getting out of memory exception when loading long list of users, roles and there capabilities. I came to know that there is Array Size Limit in .net/Dotnet framework. I cannot hold that many users in single array or collection. I think this is not scalable approach.
Following are my findings on Array Size Limit Issue based on data read from Live DB backup:

Users Cached List is a list of 11336 ENTUserAccount objects. Each ENTUserAccount contains ENTRole (1 per user mostly). Each ENTRole contains 30 RoleCapabilities and 11336 RoleUserAccounts. i.e. The list contains 11336 * 1 *(30 + 11336) objects of different types.

Logically, it doesn't seem to be appropriate having RoleUserAccounts in users' list.

As far as the use of Users Cached List is concerned, from most of the locations, application is just reading basic properties of ENTUserAccount e.g. ID and Display Text etc. There are some locations where application uses ENTUserAccount->Roles but ENTUserAccounts->Roles->RoleUserAccounts is never used from the cached list.

As per my knowledge, Role.aspx page is the only location which needs ENTRole->RoleUserAccounts and it doesn't read this data from the cached list rather it fetches the data from database when Role.aspx page is loaded for a role.

We can use some function to load ENTRole->RoleUserAccounts and ENTRole->RoleCapabilities on loading Role.aspx page but I think we should keep ENTRole->RoleUserAccounts and ENTRole->RoleCapabilities empty as there is no point to populate these lists and keep them in cache when these are never used. Just for your notice, Role.aspx page is loading both of the lists from database not from the cache.

I might be wrong so please let me know what are your views on this, please help if you have any suggestion.
Syed Hassan Abbas
Thorns road
Astley bridge, Bolton, UK
Mob: +44 (0) 7761503471

Similar Threads
Thread Thread Starter Forum Replies Last Post
User file size limit underscore10304 Windows Server 0 September 28th, 2006 06:57 AM
XML SIZE LIMIT Tristany SQL Server 2005 7 September 14th, 2006 01:01 PM
Limit the Size of String Input phungleon Classic ASP Databases 3 May 4th, 2005 11:31 PM
Compatibility DLL size limit? Yehuda Pro VB 6 10 June 10th, 2004 04:36 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.