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 9093789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:11:32+00:00 2026-06-16T23:11:32+00:00

this is my first posting here, i found already many useful hints for problems

  • 0

this is my first posting here, i found already many useful hints for problems regarding the program i am working on right now, thanks for that!
But i still have a question on my own and this one might be a little more general.

I am building a Java Program for my diploma thesis, it is a RSS Reader (im using ROME for that), all RSS entries are saved in a DB2 database (i am using OpenJPA as the Persistence layer). All incoming entries will be automatically tagged (using MAUI) and be given a “relevance score” depending on the rating the user gave for previous entries (still working on that algorithm). There is a SWING GUI where all the feeds and the entries belonging to them will be listed, the user can see the Tags, add new Tags (MAUIs machine learning will take those to improve future tagging) and give a rating for the entries.

So far i implemented all the basic functionality and it works just fine.
However, i am wondering about the performance of this program considering that all Feeds will be saved in the database and the GUI if i would follow through with my current approach.

To simplify it, i have the objects Ressource and Entry. A Ressource is an RSS Feed and Entries are all the “RSS News”, each ressource has x entries but a entry belongs to one Ressource, thats how i modelled it in DB2 and with the JPA annotations.
At runtime i create a List with all Ressources (with a “SELECT * FROM RESSOURCES” as a named Query that i call with the Entitymanager). At that moment i can access a ressources entries and fill a List in the GUI with them.
Fine – i like it like that, i get all the information out of the DB from the beginning and it is turned into Java objects.
So far i have a few hundred RSS entries and the program needs about 7MB of memory – great.

BUT: What happens as soon as we have ten thousands of entries, won´t the program need way too much memory? How can i tell JPA to just load, lets say 100 entries for each ressource (when retrieving the Ressource objects with JPA) and how can i dynamically fetch more?

I know there might be ways to work around that problem by querying on my own but i hope you know what i mean – i want to use standard JPA functionality without having all my Database turned into objects all the time resulting in a huge memory demand.

Thanks a lot for your help,
Matthias

  • 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-06-16T23:11:33+00:00Added an answer on June 16, 2026 at 11:11 pm

    Use pagination, just like Google does for example. Instead of loading all the entries, load the first 100 ones, and make it possible to load the next page of 100 entries, etc.

    See setMaxResults() and setFirstResult() in the Query class.

    Also add a search form to your GUI, because browsing through 10,000 entries to find the one you’re looking for is not something anyone wants to do.

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

Sidebar

Related Questions

This is my first time posting here, but I've found a lot of answers
Please bear with me if this isn't clear, this is my first posting here.
this is my first time posting here, I have a question which I have
use this website a lot but first time posting. My program creates a number
this is my first time posting on here and have read alot of helpful
This is my first time posting -- I found similar issues but not anything
First time posting here, last alternative to getting even more frustrated with this non-sense.
This is my first time posting here, so I apologize in advance for the
this is my first time posting a question here - I've searched for ones
First post, have found many answers here, so hopes are high. The problem: Google

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.