I am working on a web application using C # and asp.net. I am getting a memory exception. What the application does is a bunch of records (products) from a data source, it can be hundreds / thousands, processes these records using the parameters in the wizard, and then updates another data source with information about the process products. Although there are several DB classes, now all the logic is in one large class. The only reason for this is that all information is related to one thing, a product. Would memory help me if I split my application into different classes? I don’t think it would be because if I divided the business logic into two classes, both classes remained alive all the time sending messages to each other, and therefore I don’t know how this would help. I suppose my other solution would be to find outwhat to suck all memory. Is there a good tool you could recommend?
thanks
Do you use datareaders to transfer your data? (so as not to load too much into memory)
My gut tells me that this is a trivial problem to fix, do not pump data with 1 million records, work through tables one row at a time or in small batches ... Release and destroy objects when you are done with them. (Example: does not static List<Customer> allCustomers = AllCustomers())You have a design rule that ensures that no one reads tables in memory if more than X rows participate in them.
static List<Customer> allCustomers = AllCustomers()
.NET memory profiler windbg sos, .
: , SuperDuperDoEverything , . SuperDuperDoEverything - , .
, . , , .NET , , OOM - .
- Perfmon, WinDBG. adplus - , adplus -crash -iis. , - :
adplus -crash -iis
.symfix C:\symbols .reload .loadby sos mscorwks !dumpheap -stat
, .
, , , , " XML-" .
, VS Team Edition , . . , .
, , . ++, , , , Garbage, , .
, , , , ( , ), , , , , , .
,
, http://msdn.microsoft.com/en-us/magazine/cc337887.aspx
. , , , .
Perfmon; , GC. , ( GC ), , , .
? , / , /? .
Source: https://habr.com/ru/post/1702614/More articles:Analytics Goals with Subdomains - web-applicationsWhat free low-level (statistical) profilers can I use on Linux? - performanceIs "+" or "-" as a separator for the url? - urlWeb analytics for custom events platform - saasTelerik OpenAccess - ormHow to make decisions when choosing a project in an IT company? - project-management.NET user authentication, membership, portlet profile provider? - forms-authenticationПроблема с типом вывода в письменном виде обобщенного метода расширения - genericsЕсть ли какая-либо система cms в asp.net mvc, например drupal - pluginsЕсть ли способ разблокировать файл, заблокированный другим пользователем, без необходимости входа в систему VSTFS 2008, используя свою учетную запись? - tfsAll Articles