Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
QuestionDLL Injection Pin
shakeebgenii16-Nov-07 6:42
shakeebgenii16-Nov-07 6:42 
AnswerRe: DLL Injection Pin
Judah Gabriel Himango16-Nov-07 6:47
sponsorJudah Gabriel Himango16-Nov-07 6:47 
QuestionRegular Expressions Pin
tthellebuyck16-Nov-07 5:56
tthellebuyck16-Nov-07 5:56 
AnswerRe: Regular Expressions Pin
Judah Gabriel Himango16-Nov-07 6:25
sponsorJudah Gabriel Himango16-Nov-07 6:25 
AnswerRe: Regular Expressions Pin
Skippums16-Nov-07 8:36
Skippums16-Nov-07 8:36 
QuestionStrongNames and the GAC clarification needed Pin
sjdevo3gsr16-Nov-07 5:23
sjdevo3gsr16-Nov-07 5:23 
AnswerRe: StrongNames and the GAC clarification needed Pin
Judah Gabriel Himango16-Nov-07 6:53
sponsorJudah Gabriel Himango16-Nov-07 6:53 
QuestionMemory Consumption/Static Variables Pin
Techspoke116-Nov-07 4:45
Techspoke116-Nov-07 4:45 
I have a c# winforms application that has been running for roughly 4 years. When a particular user control (call it Order) is loaded, the memory consumption (according to task manager, jumps about 25-30 MB. Each time this control is loaded, the memory jumps this much until it nears 100 MB for the application, then will decrease back to 50 or so MB. Also, the control takes 2-3 seconds to load. Both of these metrics are a little high, but acceptable enough that the users do not mind.

In making an enhancement yesterday, I changed a private member variable of type DataTable to a private static DataTable. There was literally no other code change other than updating the usage of this table to reflect a static variable call. When I ran the application, I was astonished that this control now loads in less than a second. Even more, it claims to only consume about 8 MB memory, and each subsequent load no longer increases the memory usage like it used to. At first I didn't trust the performance tool, but it is obvious that the control loads much faster. The table is still initialized and populated when the control is loaded (at least the first time, all future controls share the table)...so the same exact operations are taking place.

I'm not sure why this performance increase happened. I'm hoping that somebody might have some insight to what might be going on in the framework/computer.

Thanks for the help!

- D
AnswerRe: Memory Consumption/Static Variables Pin
Judah Gabriel Himango16-Nov-07 4:58
sponsorJudah Gabriel Himango16-Nov-07 4:58 
GeneralRe: Memory Consumption/Static Variables Pin
Techspoke116-Nov-07 5:05
Techspoke116-Nov-07 5:05 
GeneralRe: Memory Consumption/Static Variables Pin
Judah Gabriel Himango16-Nov-07 5:13
sponsorJudah Gabriel Himango16-Nov-07 5:13 
GeneralRe: Memory Consumption/Static Variables Pin
Techspoke116-Nov-07 5:22
Techspoke116-Nov-07 5:22 
GeneralRe: Memory Consumption/Static Variables Pin
Judah Gabriel Himango16-Nov-07 5:32
sponsorJudah Gabriel Himango16-Nov-07 5:32 
GeneralRe: Memory Consumption/Static Variables Pin
Techspoke116-Nov-07 5:35
Techspoke116-Nov-07 5:35 
QuestionProgrammatically access Start -> Run Pin
dan!sh 16-Nov-07 2:32
professional dan!sh 16-Nov-07 2:32 
AnswerRe: Programmatically access Start -> Run Pin
Laubi16-Nov-07 2:42
Laubi16-Nov-07 2:42 
GeneralRe: Programmatically access Start -> Run Pin
Luc Pattyn16-Nov-07 2:58
sitebuilderLuc Pattyn16-Nov-07 2:58 
GeneralRe: Programmatically access Start -> Run Pin
dan!sh 16-Nov-07 4:19
professional dan!sh 16-Nov-07 4:19 
GeneralRe: Programmatically access Start -> Run Pin
Not Active16-Nov-07 4:45
mentorNot Active16-Nov-07 4:45 
GeneralRe: Programmatically access Start -> Run Pin
Ennis Ray Lynch, Jr.16-Nov-07 6:50
Ennis Ray Lynch, Jr.16-Nov-07 6:50 
GeneralRe: Programmatically access Start Run Pin
Luc Pattyn16-Nov-07 5:35
sitebuilderLuc Pattyn16-Nov-07 5:35 
AnswerRe: Programmatically access Start -> Run Pin
Pete O'Hanlon16-Nov-07 3:00
mvePete O'Hanlon16-Nov-07 3:00 
GeneralRe: Programmatically access Start -> Run Pin
dan!sh 16-Nov-07 4:14
professional dan!sh 16-Nov-07 4:14 
GeneralRe: Programmatically access Start -> Run Pin
Judah Gabriel Himango16-Nov-07 4:17
sponsorJudah Gabriel Himango16-Nov-07 4:17 
GeneralRe: Programmatically access Start -> Run Pin
dan!sh 16-Nov-07 4:24
professional dan!sh 16-Nov-07 4:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.