• Post Reply Bookmark Topic Watch Topic
  • New Topic

would a second thread help out matters Urgent

 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a swing app which uses a large gif to be used
by a JLabel for a background. My problem ; loading this
gif file is really slowing down the loading of the
programme. Would it make sense to create a secondary
threat to load the gif in order for the app to use it
Im new with threads. This is urgent
thank u
------------------
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This would only help if you are running on a multi-processor machine. Otherwise the net load time of your application will be even longer as a result of the start time of the new thread. Now if you want to load this gif such that it does not need to appear before your app helps, then this will work. This will let the user continue to work before the gif appears. But if the gif needs to be there, then the thread will not make your program get running any faster.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!