NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 38 39 40 41 42 … 93 Next »
My New Favorite Code Snippet

 
  • 0 Vote(s) - 0 Average
My New Favorite Code Snippet
jtokach
Offline

Member

Posts: 192
Threads: 36
Joined: Oct 2004
#1
2007-11-05, 03:05 PM
Remember freemem and similar applications? Bah, snake oil!

This procedure forces .NET to free memory from the workingset pool. I went on a witch hunt to find out why my new windows service was consuming 28 Mb of ram on start up with only a few references and a timer. I stumbled upon this which reduced the workingset to 1 Mb and sustained workingset of about 9 Mb. I put a call to it in my timer to run every 15 minutes.

http://west-wind.com/weblog/posts/240.aspx

Obviously, the performance increase isn't perceptable, but I feel better taking this to production without being accused of bloat.
-Jim
---------------------------------------------
GBPVR Website
GBPVR Wiki
robplatt
Offline

Member

Posts: 61
Threads: 10
Joined: Aug 2005
#2
2007-11-05, 08:34 PM
this is great. thanks!
jtokach
Offline

Member

Posts: 192
Threads: 36
Joined: Oct 2004
#3
2007-11-05, 08:45 PM
Yeah, it's really something else. Very dramatic. Give the post a rating and perhaps the word will get out a bit quicker.
-Jim
---------------------------------------------
GBPVR Website
GBPVR Wiki
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Remote control example code? drmargarit 4 3,765 2018-04-21, 11:24 PM
Last Post: drmargarit
  Looking for C# UPnP Media Server code bgowland 5 7,603 2016-12-16, 08:25 PM
Last Post: mvallevand
  Weird Code problem - serialisation (I'll spell it the proper way!!"0 psycik 22 6,116 2011-11-25, 03:16 AM
Last Post: whurlston
  sample video overlay plugin source code? reven 2 2,339 2011-10-03, 12:42 AM
Last Post: reven
  C# code to get data directory? McBainUK 2 2,780 2011-09-19, 07:57 PM
Last Post: McBainUK
  Source code for older versions ? Spark 1 1,745 2011-02-23, 01:19 AM
Last Post: sub
  special MVP code? scb147 31 8,385 2009-09-04, 02:50 AM
Last Post: scb147
  some help on basic gbpvr plugin code Etacovda 12 4,619 2009-06-14, 08:24 PM
Last Post: Etacovda
  Does this code lock the database? pastro 19 5,384 2008-05-22, 10:06 AM
Last Post: Ommina
  Easy .net snippet for accessing config.xml? zehd 3 1,676 2008-03-23, 05:58 AM
Last Post: zehd

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode