Article View: borland.public.jbuilder.java.swing
Article #584Re: garbage collector - performance problem
From: dar7yl
Date: Fri, 04 Mar 2005 02:44
Date: Fri, 04 Mar 2005 02:44
38 lines
2279 bytes
2279 bytes
"Zoran Pjevic" <zpjevic@anitesystems.de> wrote in message
news:mdfb21hrbfafuvk3o6p7ormovgbj64cumo@4ax.com...
> Hello
>
> I not sure that my question is related to Swing, but is is my best
> guess.
>
> We have an Swing based GUI which is on top of a C++ embedded
> application which feeds data into a hardware unit.
>
> In stress testing conditions under very high data rates everything
> runs fine for up to 15 hours. But then occasionaly it happens that the
> hardware gets a datadrop.
>
> When the same test is performed without the GUI, this is not noticed.
>
> So I suppose that the garbage collector is doing incremental
> collecting for hours and hours and then when some limits are reached
> it peforms some major collecting, which slows down the GUI and with it
> the underlying C++ core.
>
> If this is the case - is there any way to programmatically influence
> the schema of how the garbage collector works or at least to get a
> message from the garbage collector when it starts this major
> collecting? Or can I force it to to do its job in the background?
>
> Or do you think I am completely wrong with my interpretation of the
> problem?
>
> Thanks for any hints,
> Zoran
Try calling System.gc() from your GUI application.
I've found if you call it on a periodic basis, major garbage collection
hesitations are minimized (but not eliminated entirely)
regards,
Dar7yl
Technical Details
Message-ID:
<4227cb9b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<mdfb21hrbfafuvk3o6p7ormovgbj64cumo@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,d46e183f285a3126 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "dar7yl" <no@reply.org> Newsgroups: borland.public.jbuilder.java.swing References: <mdfb21hrbfafuvk3o6p7ormovgbj64cumo@4ax.com> Subject: Re: garbage collector - performance problem Date: Thu, 3 Mar 2005 18:44:47 -0800 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 142.179.38.204 Message-ID: <4227cb9b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1109904283 142.179.38.204 (3 Mar 2005 18:44:43 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail