• Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance problems with streams?

 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet that calls back to a servlet to pull about one megabyte of data and then render it in a Java3D application. This process takes about 40 seconds on a LAN (about 105 seconds on a 128K DSL line), yet only takes 10 seconds when the same code is used as a local application.

I find it hard to believe that there should be that much overheard across a LAN or the Internet, and I'm hoping that there is something that I can do to help improve the performance.

Here is the code I use in the servlet to load up the data (again, very fast locally)



On the applet (same as the local application) side, the code looks like this:



The HeaderReader looks like this:



Is there anything I can do (change the bffer size maybe?) to help improve performance across the wire?

Note that I have tried different size buffers in the servlet (1024, 2048, and 8192) and nothing made any differnce in time at all.

Thanks!
[ May 27, 2005: Message edited by: Darrin Smith ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!