|
Re: Cache Problem when using Xulrunner in SWT [message #481906 is a reply to message #480224] |
Mon, 24 August 2009 17:05 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
Hi Martin, sorry for the late reply,
I tried to reproduce this by running a couple of instances of the snippet
below, but they seem to refresh fine when I double-click on their Browsers.
Does running multiple instances of this snippet refresh for you? And if so,
maybe it's something more specific to the page you're refreshing? Which
xulrunner version are you using (the snippet outputs its path at startup)?
public static void main (String [] args) {
Device.DEBUG = true;
final Display display = new Display ();
final Shell shell = new Shell (display);
shell.setBounds(10,10,250,250);
shell.setLayout(new FillLayout());
final Browser browser = new Browser(shell, SWT.MOZILLA);
browser.setUrl("http://www.eclipse.org");
browser.addListener(SWT.MouseDoubleClick, new Listener() {
public void handleEvent(Event event) {
System.out.println("refreshing");
browser.refresh();
}
});
shell.open();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
Grant
"Martin Burchard" <news@martin-burchard.de> wrote in message
news:h63mek$4ar$1@build.eclipse.org...
> Hello,
>
> I already posted this question to eclipse.platform.rcp but didn't get
> any reaction in the last days.
> Because this problem is related to SWT I hope that this is a better
> place to get an answer.
>
> Problem:
> In my Java application I explicitly use the Mozilla Engine (Xulrunner).
>
> browser = new Browser(parent, SWT.MOZILLA);
>
> Currently I work under Windows.
>
> When doing so, a new Mozilla profile named eclipse is created and
> automatically chosen when starting my application.
> This seems to be a default.
> Within this eclipse profile the Cache folder is filled when browsing
around.
>
> Now I start a second RCP application, that also uses the Gecko engine.
> This other application also uses the eclipse profile folder and the
> Cache folder.
>
> If now I reload my page in the first application, loading does not
> finish. No images are shown (they should come from cache)...
>
> Can somebody else confirm this behaviour? Is there a solution?
>
> Regards
> Martin
|
|
|
Re: Cache Problem when using Xulrunner in SWT [message #527010 is a reply to message #481906] |
Tue, 13 April 2010 17:00 |
Markward Schubert Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Hi!
I can confirm the situation described by Martin and can add some information.
We have an application which shows some dashboard after startup. The dashboard is web-based and has some images on it, which are served by an ordinary webserver. No dynamic painting and such here.
I opened the mozilla profile as described by Martin and in there the folder "Cache". When I open one instance of our application and the dashboard site is shown the first time, some entries are created in the cache-folder of the profile. Some entries are in fact the images, which I assured by temporarily renaming them an opening them in an image-viewer.
Now, when a second instance of our app is opened from eclipse in parallel to the first one, after the dashboard site is shown, all entries from the Cache folder are removed, except the files:
_CACHE_001_
_CACHE_002_
_CACHE_003_
_CACHE_MAP_
The images are gone from now on and will not be displayed at subsequent starts of the application.
Finally, when this situation is reached. If you then open two applications in parallel again, the first one will not show the images, but the second will, but without putting the images in the cache folder again.
I don't know if this is a general rule, but it seems, that this behaviour only applies to jpg-files. The gifs seem not to be cached at all.
If the actual page is of any help, I can send you a private message with the link.
|
|
|
Powered by
FUDForum. Page generated in 0.02811 seconds