• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calculate total files size at applet loading : slow

 
Yahya Elyasse
Ranch Hand
Posts: 510
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I have an applet for downloading unlimited files number via HTTpConnection.

one requirement is to calculate the total size of all files to download.
i wrote a method that iterate through my files list ,call Httpconnection openConnection method get file lengh and add to totalsize variable.

How ever this process which take place at applet loading seem to be very slow.

is there any better alternative to calculate total size of multiple files on a HTTp server ? is there any workaround to minimize calculation time process?

thank you.
 
GS Chidam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

One option, you can use multi threading, each iteration is one thread, it will save time
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic