Hi,

I don't think this would help. If a thread iterates over a collection
while another thread is modifying it, you'd get
ConcurrentModificationException anyway.
Is this iterator ever used somewhere? If it is, we have to solve it
somehow differently. Nevertheless making just puts and gets
synchronized solved the issue at least for us - we don't encounter any
crashes while starting the app.

The scenario that was causing this was the following:

Thread one: load window 1 from BXML
Thread two: load window 2 from BXML
Thread three: load window 3 from BXML
Thread four: load window 4 from BXML
Join threads
In GUI thread - open all the loaded windows

It is important for us to make it work (stable), because on a
multicore machine it improves loading windows by about 40% (not
perfect, but visibly faster).

BTW: Have you ever optimised pivot for faster startup times? The first
thing we noticed when we switched from Swing is that Pivot was somehow
slower to start up. This is worrying me - now it is not a problem it
the user waits for 1 second to load the app (I'm talking about warm
start up), but if in future the gui gets bigger... The competition
using JavaScript doesn't have that problem. :( Maybe there are some
possibilities to limit the amount of classloading or make some things
more lazy?

Thanks,
Piotr



2012/5/14 Sandro Martini <sandro.mart...@gmail.com>:
> Hi Piotr,
> if you want I can apply it ...
>
> but I think we need to synchronize even this method, right ?
>
>        public synchronized Iterator<URL> iterator() {
>            return new Iterator<URL>() {
>                private Iterator<URI> iterator = resourceCache.iterator();
>
>
> Tell me ...
>
> Bye

Reply via email to