Bug 196467 - static field ValidationTransaction.preloadedSchemas holds about 10MB of unGCable memory
static field ValidationTransaction.preloadedSchemas holds about 10MB of unGCa...
Status: VERIFIED FIXED
Product: web
Classification: Unclassified
Component: HTML Editor
7.0
PC Mac OS X
: P2 (vote)
: 7.0
Assigned To: Marek Fukala
issues@javaee
: 70_HR_FIX, PERFORMANCE
Depends on:
Blocks: 195337
  Show dependency treegraph
 
Reported: 2011-03-09 08:29 UTC by Marek Fukala
Modified: 2011-03-25 21:26 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2011-03-09 08:29:13 UTC
Html validator loads the html schemas during the initialization. The schemas occupies about 10MB of memory which is never GCed even if the needed. OTOH the schemas creation is very costly so it is questionable whether it is even desired to GC them.

see the exception report http://statistics.netbeans.org/exceptions/exception.do?id=490857
Comment 1 Marian Mirilovic 2011-03-10 10:08:54 UTC
Marek, do you think you will be able to fix it for NB 7.0 ? If so I would vote for it.
Comment 2 Marek Fukala 2011-03-10 10:17:56 UTC
I was just about to ask whether this issue is considered as serious and hence should be P2 and fixed for 7.0. :-). So OK, I'll take a look at it.
Comment 3 Marek Fukala 2011-03-18 15:30:05 UTC
fixed in web-main#54d80248ab72

Honzo, since you've filed one duplicate of this issue, could you please review the fix. In short the mentioned static field now holds a group of Schema instances which wraps the original instancies. The delegates are held softly and created lazily. 

Another advantage of the fix is that the validator initialization is faster since only empty shells are created and until the schema is really needed it is not loaded and initialized.
Comment 4 Marek Fukala 2011-03-18 15:35:53 UTC
Vladimire, can you please verify the trunk fix once it's available? Opening/creating/closing/deleting of x/html documents with various doctypes should do that. Also please observe whether the error checks are working properly. Thanks in advance!
Comment 5 Vladimir Riha 2011-03-18 16:56:34 UTC
OK, so If I understand it right, I should try to open/create/... (x)html files and check memory usage and the error check?
Comment 6 Jan Lahoda 2011-03-18 17:34:05 UTC
The patch seems fine to me. Thanks.
Comment 7 Marek Fukala 2011-03-21 08:47:26 UTC
(In reply to comment #5)
> OK, so If I understand it right, I should try to open/create/... (x)html files
> and check memory usage and the error check?
you do not have to check the memory usage, just verify whether there are some functional (bad) consequences of the fix.
Comment 8 Marek Fukala 2011-03-22 13:56:45 UTC
Vlado, have you look at the issue? I'd like to integrate to the 7.0 branch...
Comment 9 Vladimir Riha 2011-03-22 14:53:59 UTC
So far, It doesn't seem to be in any build
Comment 10 Marian Mirilovic 2011-03-24 08:36:27 UTC
(In reply to comment #9)
> So far, It doesn't seem to be in any build

Marek : so what is the status of this issue ?
Comment 11 Quality Engineering 2011-03-24 09:49:59 UTC
Integrated into 'main-golden', will be available in build *201103240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/54d80248ab72
User: Marek Fukala <mfukala@netbeans.org>
Log: #196467 - static field ValidationTransaction.preloadedSchemas holds about 10MB of unGCable memory
Comment 12 Vladimir Riha 2011-03-24 16:58:33 UTC
Seems fine, verified
Comment 13 Marek Fukala 2011-03-25 21:26:26 UTC
changeset:   195070:bc225693d9ad
branch:      release70
user:        Marek Fukala <mfukala@netbeans.org>
date:        Fri Mar 18 16:22:31 2011 +0100
summary:     #196467 - static field ValidationTransaction.preloadedSchemas holds about 10MB of unGCable memory


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo