The memory usage of the self-built module is too high. A process does not occupy more than 20 MB, and both the boss and the customer can't stand it, and the memory is optimized.
Before thinking about any good optimization methods, I would like to try to optimize DLL references.
Optimization ideas: 1. Ensure that the DLL cannot be called.
2. Merge the functions that all processes need to call as much as possible.
Start following this idea, one afternoon dug, tracking ....
First inProgramEmbedded in the debug statement, print the time point, and see whatCodeWhat are the bad things.
Before optimization, enter the following in one step:
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ mscorlib \ 2.0.0.0 _ b77a5c561934e089 \ mscorlib. dll "is loaded, and the symbol loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Javasneconnection.exe "(managed): 'c: \ windows \ Assembly \ gac_msil \ mscorlib. Resources \ 2.0.0.0 _ zh-CHS_b77a5c561934e089 \ mscorlib. Resources. dll' has been loaded, skipping symbolic loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed): The" F: \ current work \ online command platform \ 2. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ neconnection.exe "has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. dataentity. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. remotingobjectlib. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. useridentityinterface. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. neadapterbase. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System \ 2.0.0.0 _ b77a5c561934e089 \ system. dll "is loaded, and symbol loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. equipment. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. Configuration \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. configuration. dll "has been loaded and the symbolic loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. xml \ 2.0.0.0 _ b77a5c561934e089 \ system. xml. dll "is loaded, and the symbolic loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Start Process: 2009/11/3 14:26:51
Start Remote Call and obtain user information: 14:26:51
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. runtime. remoting \ 2.0.0.0 _ b77a5c561934e089 \ system. runtime. remoting. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
End Remote Call and obtain user information: 14:26:52
Start remote call and check port connection limit: 14:26:52
End remote call and check port connection limit: 14:26:52
Startup timeout non-active monitoring object: 2009/11/3 14:26:52
Start multicast message object: 14:26:52
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. dataaccess. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. Core \ 3.5.0.0 _ b77a5c561934e089 \ system. Core. dll "is loaded, and the symbolic loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. data. LINQ \ 3.5.0.0 _ b77a5c561934e089 \ system. data. LINQ. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ System. Data \ 2.0.0.0 _ b77a5c561934e089 \ system. Data. dll "is loaded, and the symbol loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ System. Transactions \ 2.0.0.0 _ b77a5c561934e089 \ system. Transactions. dll "has been loaded and the symbol loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Added "C: \ WINDOWS \ Assembly \ gac_32 \ System. enterpriseservices \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. enterpriseservices. dll" to the managed file. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" anonymously hosted dynamicmethods assembly "has been loaded"
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. XML. LINQ \ 3.5.0.0 _ b77a5c561934e089 \ system. XML. LINQ. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
Start heartbeat: 2009/11/3 14:26:52
Obtain the network element group to which the network element belongs: 14:26:52
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. pgmsocket. DLL ", the symbol has been loaded.
Start the network element connection object: 2009/11/3 14:26:52
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ dart. powertcp. Telnet. dll "has been loaded"
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. windows. forms \ 2.0.0.0 _ b77a5c561934e089 \ system. windows. forms. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. Drawing \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. Drawing. dll "has been loaded and the symbol loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Start ended: 2009/11/3 14:26:52
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ emcaster. DLL ", the symbol has been loaded.
When something is found wrong, start the multicast message object. This pure socket operation module references a lot of unknown DLL, review code, and make a change. OK is like the following.
Using virtualportserviceconsole.vshost.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. useridentityinterface. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ mscorlib \ 2.0.0.0 _ b77a5c561934e089 \ mscorlib. dll "is loaded, and the symbol loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Javasneconnection.exe "(managed): 'c: \ windows \ Assembly \ gac_msil \ mscorlib. Resources \ 2.0.0.0 _ zh-CHS_b77a5c561934e089 \ mscorlib. Resources. dll' has been loaded, skipping symbolic loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed): The" F: \ current work \ online command platform \ 2. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ neconnection.exe "has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. dataentity. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. remotingobjectlib. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. useridentityinterface. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. neadapterbase. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System \ 2.0.0.0 _ b77a5c561934e089 \ system. dll "is loaded, and symbol loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. equipment. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. Configuration \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. configuration. dll "has been loaded and the symbolic loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. xml \ 2.0.0.0 _ b77a5c561934e089 \ system. xml. dll "is loaded, and the symbolic loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Start Process: 2009/11/3 15:08:38
Start Remote Call and obtain user information: 15:08:38
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. runtime. remoting \ 2.0.0.0 _ b77a5c561934e089 \ system. runtime. remoting. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
Using virtualportserviceconsole.vshost.exe "(managed):" Ultra. NMOS. neidentityimplementforcommon "has been loaded"
Using virtualportserviceconsole.vshost.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. neidentityinterface. DLL ", the symbol has been loaded.
Using virtualportserviceconsole.vshost.exe "(managed):" Ultra. NMOS. useridentityimplementfornmos "has been loaded"
Using virtualportserviceconsole.vshost.exe "(managed): the" C: \ WINDOWS \ Assembly \ gac_msil \ System. directoryservices \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. directoryservices. dll "has been loaded. The module has been optimized and the debugger option "My code only" has been enabled ".
Using virtualportserviceconsole.vshost.exe "(managed): the" C: \ WINDOWS \ Assembly \ gac_32 \ customexternalers \ 2.0.0.0 _ b03f5f7f11d50a3a \ customexternalers. dll "has been loaded and skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Using virtualportserviceconsole.vshost.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ System. web \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. Web. dll "has been loaded and the symbol loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
End Remote Call and obtain user information: 15:08:40
Start remote call and check port connection limit: 15:08:40
End remote call and check port connection limit: 15:08:40
Startup timeout non-active monitoring object: 2009/11/3 15:08:40
Start multicast message object: 15:08:40
Start heartbeat: 2009/11/3 15:08:40
Obtain the network element group to which the network element belongs: 15:08:40
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. dataaccess. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. pgmsocket. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. Core \ 3.5.0.0 _ b77a5c561934e089 \ system. Core. dll "is loaded, and the symbolic loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. data. LINQ \ 3.5.0.0 _ b77a5c561934e089 \ system. data. LINQ. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ System. Data \ 2.0.0.0 _ b77a5c561934e089 \ system. Data. dll "is loaded, and the symbol loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ System. Transactions \ 2.0.0.0 _ b77a5c561934e089 \ system. Transactions. dll "has been loaded and the symbol loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Added "C: \ WINDOWS \ Assembly \ gac_32 \ System. enterpriseservices \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. enterpriseservices. dll" to the managed file. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" anonymously hosted dynamicmethods assembly "has been loaded"
Start the network element connection object: 2009/11/3 15:08:40
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. XML. LINQ \ 3.5.0.0 _ b77a5c561934e089 \ system. XML. LINQ. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ dart. powertcp. Telnet. dll "has been loaded"
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. windows. forms \ 2.0.0.0 _ b77a5c561934e089 \ system. windows. forms. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. Drawing \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. Drawing. dll "has been loaded and the symbol loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Start ended: 2009/11/3 15:08:40
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ emcaster. DLL ", the symbol has been loaded.
Not much, but it seems that I haven't used the many pieces of LINQ. I have to take it out:
Using virtualportserviceconsole.vshost.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. useridentityinterface. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ mscorlib \ 2.0.0.0 _ b77a5c561934e089 \ mscorlib. dll "is loaded, and the symbol loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Javasneconnection.exe "(managed): 'c: \ windows \ Assembly \ gac_msil \ mscorlib. Resources \ 2.0.0.0 _ zh-CHS_b77a5c561934e089 \ mscorlib. Resources. dll' has been loaded, skipping symbolic loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed): The" F: \ current work \ online command platform \ 2. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ neconnection.exe "has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. dataentity. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. remotingobjectlib. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. useridentityinterface. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. neadapterbase. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System \ 2.0.0.0 _ b77a5c561934e089 \ system. dll "is loaded, and symbol loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. equipment. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. pgmsocket. DLL ", the symbol has been loaded.
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. Configuration \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. configuration. dll "has been loaded and the symbolic loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. xml \ 2.0.0.0 _ b77a5c561934e089 \ system. xml. dll "is loaded, and the symbolic loading is skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Start Process: 2009/11/3 15:42:54
Start Remote Call and obtain user information: 15:42:54
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. runtime. remoting \ 2.0.0.0 _ b77a5c561934e089 \ system. runtime. remoting. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
Using virtualportserviceconsole.vshost.exe "(managed):" Ultra. NMOS. neidentityimplementforcommon "has been loaded"
Using virtualportserviceconsole.vshost.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ Ultra. NMOS. neidentityinterface. DLL ", the symbol has been loaded.
Using virtualportserviceconsole.vshost.exe "(managed):" Ultra. NMOS. useridentityimplementfornmos "has been loaded"
Using virtualportserviceconsole.vshost.exe "(managed): the" C: \ WINDOWS \ Assembly \ gac_msil \ System. directoryservices \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. directoryservices. dll "has been loaded. The module has been optimized and the debugger option "My code only" has been enabled ".
Using virtualportserviceconsole.vshost.exe "(managed): the" C: \ WINDOWS \ Assembly \ gac_32 \ customexternalers \ 2.0.0.0 _ b03f5f7f11d50a3a \ customexternalers. dll "has been loaded and skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Using virtualportserviceconsole.vshost.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_32 \ System. web \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. Web. dll "has been loaded and the symbol loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
End Remote Call and obtain user information: 15:42:56
Start remote call and check port connection limit: 15:42:56
End remote call and check port connection limit: 15:42:56
Startup timeout non-active monitoring object: 2009/11/3 15:42:56
Start multicast message object: 15:42:56
Start heartbeat: 2009/11/3 15:42:56
Obtain the network element group to which the network element belongs: 15:42:56
Start the network element connection object: 2009/11/3 15:42:56
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ dart. powertcp. Telnet. dll "has been loaded"
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System has been loaded. windows. forms \ 2.0.0.0 _ b77a5c561934e089 \ system. windows. forms. DLL ", skipped symbol loading. The module has been optimized and the debugger option "My code only" has been enabled ".
“Neconnection.exe "(managed):" C: \ WINDOWS \ Assembly \ gac_msil \ System. Drawing \ 2.0.0.0 _ b03f5f7f11d50a3a \ system. Drawing. dll "has been loaded and the symbol loading has been skipped. The module has been optimized and the debugger option "My code only" has been enabled ".
Start ended: 2009/11/3 15:42:56
“Neconnection.exe "(managed):" F: \ current work \ online command platform \ 2 has been loaded. program code \ virtualportservice \ virtualportserviceconsole \ bin \ debug \ emcaster. DLL ", the symbol has been loaded.
By now, the first-stage optimization has reached the standard.
After optimization, I summarized the code issues:
1: There is no concept of memory control during development, and insufficient attention is paid to DLL introduction, leading to DLL reference in disorder.
2: when designing a module, system overhead is not taken into account in some places, resulting in low work efficiency.
However, this problem is sometimes inevitable during development. The first priority is simple implementation (after all, we do Application Development), but we need to develop good habits, otherwise, writing three lines of code requires 1 MB of memory, which is unacceptable to any boss.
3: Quality awareness. This is the key. during development, the general problem is not lack of quality awareness, but the quality awareness is not strict. improve the Code requirements as much as possible. in this way, we will be more confident in the face of customers and boss.