Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7435453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:04:38+00:00 2026-05-29T10:04:38+00:00

I have around 150 gifs (all rather small = 1KB) in a static class

  • 0

I have around 150 gifs (all rather small = 1KB) in a static class and in statements like these

public final static ImageIcon I_ADDFAV = new ImageIcon("icons/addfavorite.gif");
public final static ImageIcon I_AUTO_LOAD = new ImageIcon("icons/auto_load.gif");
...

I use them to display JButtons with icons.
During Application start I noticed an increased loading time associated to these statements of approximately 2seconds. I would like to know if somebody knows a faster way to load these gifs. I was thinking that boundly all of them in a single file could be a way as I suspect that reading 150 small files from disc is the actual delay in this. But I could be wrong. Does anybody have a smart idea or has ever handled such situation? We would like to bring this down to msecs.

cheers
ioannis

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:04:39+00:00Added an answer on May 29, 2026 at 10:04 am

    I would recommend combining all the images into a single file, much as a website should combine all its image requests into a single request for a bunch of sprites. Almost all of the time spent loading a file from disk is spent in seek time (moving the head to the right track on the disk) and rotational delay (waiting for the disk to rotate around so the head is over the right bits). So, the time to read a large file from disk is essentially the same as the time to read a lot of small files from disk, and once the large image is in memory you can pull apart all the sprites and show them on your buttons.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small portable tool which connects to around 150 servers at diverse
I have around 3500 flood control facilities that I would like to represent as
I have around 400 GB Live mysql Databases on one server and I like
I have a rather large table with 150,000 + records. It has a lot
I have around 150 MySQL databases, I need to export 1 table from each
I have table with articles and there is around 150.000 of records, in that
I have a table with about 150 rows in it. These are the data
I have a custom type in my model like so: [StringLength(1000, MinimumLength = 150,
I have a xml doc with around 150 entries. I am sorting the entries
I have a dataset of around 150 million records that's generated daily it contains:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.