Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 12th, 2005, 10:32 AM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default Garbage Collection Issue in Time Sensitive Program

I've written a VB.NET Windows based application that runs full time on several machines. It acts like a time clock, collecting information on when employees arrive at and leave work. It consists of a login screen which is always displayed when the program is not being used, and other screens that are only loaded when necessary.

On occasion, when the program has not been used for a while, it takes as much as 30 seconds to load the second screen displayed once the user clears the login screen. As the time an employee arrives at work effects when they may leave, this delay is causing concern amongst employees who queue up to sign in for the day because they may have to work a whole minute longer (gasp!).

I believe this delay is related to garbage collection - either GC is running when this delay occurs and the program is getting insufficient CPU to load the next form, or the form has to be run through the JIT again because the last instance was disposed. I may be mistaken on the last statement, as I was thinking that perhaps if an object was disposed but not cleand up, it could be re-used without recompiling and .NET may nto be able to do that, but it was a thought I had trying to explain this delay.

I'm looking for ways to minimize GC so it does not impact the performance of the program (which is practically the only thing running on the computer). I've searched the web and the consensus seems to be that there is no way to either prevent GC, which is probably not desirable except for the most anal of developers, or even schedule it to only run at certain times. I'd try giving higher priority to the program and lower priority to GC, except they appear to run in the same thread which would seem to make that not possible. I suppose I could retain copies of all the forms in memory at all times, but would a lack of reference still invoke garbage collection?

Does anybody have information contrary to this? If not, is there anything you can suggest to improve performance at these times?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Garbage Collection azizur123 .NET Framework 2.0 1 February 3rd, 2008 11:16 AM
Garbage collection in VC++ chandugsekhar BOOK: Beginning Visual C++ 6 0 October 18th, 2006 12:09 PM
Garbage Collection... kk_katepally General .NET 1 December 21st, 2004 04:18 AM
garbage collection can't work? gkb Pro PHP 1 July 31st, 2003 02:06 PM



All times are GMT -4. The time now is 08:05 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.