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
Marek, do you think you will be able to fix it for NB 7.0 ? If so I would vote for it.
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.
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.
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!
OK, so If I understand it right, I should try to open/create/... (x)html files and check memory usage and the error check?
The patch seems fine to me. Thanks.
(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.
Vlado, have you look at the issue? I'd like to integrate to the 7.0 branch...
So far, It doesn't seem to be in any build
(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 ?
Integrated into 'main-golden', will be available in build *201103240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Marek Fukala <email@example.com>
Log: #196467 - static field ValidationTransaction.preloadedSchemas holds about 10MB of unGCable memory
Seems fine, verified
user: Marek Fukala <firstname.lastname@example.org>
date: Fri Mar 18 16:22:31 2011 +0100
summary: #196467 - static field ValidationTransaction.preloadedSchemas holds about 10MB of unGCable memory