Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

showDocument() delay

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the user clicks a certain button in my applet, showDocument() is called. But there is a big delay until the new page is loaded. Does anyone know what the problem may be (the pages loads quickly normally)?

Thanks,
James
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've noticed that I don't experience the delay if I wait a while before clicking the showDocument() button.

I inserted some code to print out the active threads just before the showDocument() line is executed and it seems that a couple of "Image Fetcher" threads are causing the slowness.

Does anyone know where these "Image Fetcher" threads come from and how I can end them? (I've tried using interrupt() on them, but to no avail.)

Cheers,
James
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Image-Fetcher threads may have been a red herring: I am still experiencing this showDocument() delay problem when the only threads running are the main applet thread and the AWT-EventQueue thread.

The problem doesn't just happen when showDocument() is called but also occurs when I enter a new url in the browser's address bar.

I have also noticed, in terms of the applet lifecycle, the delay is occuring before the applet's stop() and destroy() methods are called.

Is the problem likely to be related to the AWT-EventQueue thread? I've been trying to solve this for nearly two days now - does anyone ple-e-ease have any ideas?

Cheers,
James
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic