Click here to Skip to main content
15,895,084 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Seeking advice for storing data in memory Pin
Ian McCaul12-May-09 8:32
Ian McCaul12-May-09 8:32 
GeneralRe: Seeking advice for storing data in memory Pin
glumlord12-May-09 8:37
glumlord12-May-09 8:37 
GeneralRe: Seeking advice for storing data in memory Pin
Ian McCaul12-May-09 8:43
Ian McCaul12-May-09 8:43 
GeneralRe: Seeking advice for storing data in memory Pin
glumlord12-May-09 9:26
glumlord12-May-09 9:26 
GeneralRe: Seeking advice for storing data in memory Pin
jarbo3a12-May-09 20:13
jarbo3a12-May-09 20:13 
GeneralRe: Seeking advice for storing data in memory Pin
glumlord13-May-09 7:35
glumlord13-May-09 7:35 
AnswerRe: Seeking advice for storing data in memory Pin
Dave Kreskowiak12-May-09 8:43
mveDave Kreskowiak12-May-09 8:43 
GeneralRe: Seeking advice for storing data in memory Pin
glumlord12-May-09 9:24
glumlord12-May-09 9:24 
Dave Kreskowiak wrote:
Memory as measured by what?? Please don't tell me you used TaskManager! It's kind of lying to you when it comes to .NET apps. You really have to understand what TaskManager is looking at. If you want more accurate numbers of what your APPLICATION is using, use Performance Monitor and the .NET Memory counters.


I do use Task Manager and I added all the columns that refer to Memory. I compared that to the previous version of my application using Arrays. It may not be accurate completely but I would beg to differ if you think it's useless Smile | :) It tells me that the version with Datatables instead of an Array is taking 6 x as much memory.

I use the following to flush memory, which I have good luck with in the past.

Public Class MemoryManagement<br />
<br />
    Private Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" ( _<br />
      ByVal process As IntPtr, _<br />
      ByVal minimumWorkingSetSize As Integer, _<br />
      ByVal maximumWorkingSetSize As Integer) As Integer<br />
<br />
    Public Shared Sub FlushMemory()<br />
        GC.Collect()<br />
        GC.WaitForPendingFinalizers()<br />
        If (Environment.OSVersion.Platform = PlatformID.Win32NT) Then<br />
            SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1)<br />
        End If<br />
    End Sub<br />
<br />
End Class


Dave Kreskowiak wrote:
glumlord wrote:
Processor - While storing to the Datatable the processor is at 15-30%

30%?? Who cares??


It does matter because this app is on every single desktop pc in our organization and opens at windows startup when processor time will directly affect how quickly a user can use his/her pc.

Dave Kreskowiak wrote:
The DataTable class has quite a large overhead compared to an Array. So, if an array works for you, great! If not, you may want to look into a Generic collection solution.


Thanks for that suggestion, I'll do some research into that. I appreciate any help I can get as most of this stuff I have learned from reading and am still quite wet under the ears.
GeneralRe: Seeking advice for storing data in memory Pin
Dave Kreskowiak12-May-09 11:01
mveDave Kreskowiak12-May-09 11:01 
GeneralRe: Seeking advice for storing data in memory Pin
Luc Pattyn12-May-09 9:45
sitebuilderLuc Pattyn12-May-09 9:45 
GeneralRe: Seeking advice for storing data in memory Pin
Dave Kreskowiak12-May-09 10:57
mveDave Kreskowiak12-May-09 10:57 
GeneralRe: Seeking advice for storing data in memory Pin
Luc Pattyn12-May-09 13:54
sitebuilderLuc Pattyn12-May-09 13:54 
GeneralRe: Seeking advice for storing data in memory Pin
Dave Kreskowiak12-May-09 16:12
mveDave Kreskowiak12-May-09 16:12 
GeneralRe: Seeking advice for storing data in memory Pin
glumlord13-May-09 7:30
glumlord13-May-09 7:30 
QuestionUnable to run the code from sp1 in sp2 Pin
SuchiTN12-May-09 4:06
SuchiTN12-May-09 4:06 
AnswerRe: Unable to run the code from sp1 in sp2 Pin
Pete O'Hanlon12-May-09 4:20
mvePete O'Hanlon12-May-09 4:20 
AnswerRe: Unable to run the code from sp1 in sp2 Pin
Luc Pattyn12-May-09 4:39
sitebuilderLuc Pattyn12-May-09 4:39 
Question[Message Deleted] Pin
lynn100712-May-09 3:34
lynn100712-May-09 3:34 
AnswerRe: How to use activeX function that has a pointer parameter in JavaScript? Pin
Dave Kreskowiak12-May-09 6:56
mveDave Kreskowiak12-May-09 6:56 
Question[Message Deleted] Pin
dragonfighterlee2112-May-09 2:36
dragonfighterlee2112-May-09 2:36 
AnswerRe: ADD FILES TO SINGLE EXECUTABLE IN VB.NET Pin
Dave Kreskowiak12-May-09 6:55
mveDave Kreskowiak12-May-09 6:55 
GeneralRe: ADD FILES TO SINGLE EXECUTABLE IN VB.NET [modified] Pin
dragonfighterlee2112-May-09 7:29
dragonfighterlee2112-May-09 7:29 
GeneralRe: ADD FILES TO SINGLE EXECUTABLE IN VB.NET Pin
Dave Kreskowiak12-May-09 8:26
mveDave Kreskowiak12-May-09 8:26 
QuestionMDI child window maximize through title-bar double-click Pin
angusmax12-May-09 0:03
angusmax12-May-09 0:03 
AnswerRe: MDI child window maximize through title-bar double-click Pin
Dave Kreskowiak12-May-09 6:53
mveDave Kreskowiak12-May-09 6:53 

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.