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

  • SEARCH
  • Home
  • 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 6793257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:04:44+00:00 2026-05-26T18:04:44+00:00

I am maintaining an old J2EE web application and been getting complaints about fixing

  • 0

I am maintaining an old J2EE web application and been getting complaints about fixing it’s performance. On analysing it’s data architecture, I realised that the programmer(s) is/have hash sets to store table values that grow to thousands of rows. Considering what the java API says about the hashset I really think this is a really really bad idea, especially when the database tables are ordered by some attribute(s) so this is where the performance hit is coming from but I need to apply some solution to mitigate this performance hit and whilst I am thinking of several options, I’d like to know if I can use some other data structure that requires less computation to hold the data. Below is an excerpt of one of the classes to be mapped to the database. bear in mind that there’s about another 12+ members including what’s shown here:

    /* Hibernate attribute mapping */

private Set<Supplier> suppliers = new HashSet<Supplier>(); 

private Set<Customer> customers = new HashSet<Customer>(); 

private Set<Tarif> tarif = new HashSet<Tarif>(); 

private Set<Contribution> contributions = new HashSet<Contribution>();

private Set<Premium> premiums = new HashSet<Premium>();

private Set<Alert> alerts = new HashSet<Alert>(); 

private Set<CustomerInvoice> customerInvoices = new HashSet<CustomerInvoice>();

private Set<Monitoring> monitorings = new HashSet<Monitoring>();    

private Set<Criterions> criterions= new HashSet<Criterions>();

private Set<User> registeredUsers= new HashSet<User>();

private Set<Cost> costs= new HashSet<Cost>();
  • 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-26T18:04:45+00:00Added an answer on May 26, 2026 at 6:04 pm

    Using TreeSet may be right for you. It provides O(log(n)) access performance.

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

Sidebar

Related Questions

It is Hallowe'en after all. Here's the problem: I'm maintaining some old-ish J2EE code,
I'm maintaining a .NET 1.1 application and one of the things I've been tasked
I recently started maintaining an old EJB2 application running on OC4J. That includes EJB
I'm maintaining an old-ish application written in VBA for Excel 2002 (XP)/2003, and am
So we've an old circa 2000 Powerbuilder App that we've been maintaining all this
I'm maintaining an old application. I'd to start a merge replication between two servers.
I'm maintaining an old VB6 application, that uses some Sheridan 3D controls (SSPanel and
I am maintaining an old VB6 application, and would like to include SQL scripts
I'm maintaining an old asp classic application. It uses Response.AppendToLog as its sole debug
Right now we are maintaining some old project written in VB6 we are planning

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.