Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Cache Problem when using Xulrunner in SWT
Cache Problem when using Xulrunner in SWT [message #480224] Fri, 14 August 2009 12:48 Go to next message
Martin Burchard is currently offline Martin BurchardFriend
Messages: 6
Registered: July 2009
Junior Member
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 #481906 is a reply to message #480224] Mon, 24 August 2009 17:05 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
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 Go to previous message
Markward Schubert is currently offline Markward SchubertFriend
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.
Previous Topic:high number of handles used by form based editor
Next Topic:Embedded Mozilla, Cookies
Goto Forum:
  


Current Time: Sat Dec 14 21:41:44 GMT 2019

Powered by FUDForum. Page generated in 0.01534 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top