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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:30:15+00:00 2026-06-09T00:30:15+00:00

This is a fairly abstract question, I hope it is within bounds. I’m about

  • 0

This is a fairly abstract question, I hope it is within bounds.

I’m about 5 months into my coding career in web development. I’ve found that there’s often a tension between CPU and storage resources. Put simply, you can use less of one and more of the other, or vice versa (then throw in the speed consideration). I’m now getting to the point of deploying my first app for production, so this balance is now a matter of real dollars and cents. The thing is this: I really don’t have any idea what kind of balance I should be looking for.

Here’s some salient examples that might illuminate the balance to be struck in different case scenarios.

Background

I am working on an app that does alot of diffs between text. Users will call on pages that contain diffs displayed in html. A lot.

First Case

Should I run a diff each time a page is displayed, or should I run the diff once, store it, and call it each time a page is displayed?

Second Case

I have coded up an algorithm that summarises diffs. It’s about 110 lines of code, and it uses 4 or 5 loops and subloops. Again, should I run this once and store the results, so that they can be called on later, or should I just run the algorithm each time a page is displayed?

Would also love to hear your views on the best tools to use to quantify the balance.

  • 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-09T00:30:17+00:00Added an answer on June 9, 2026 at 12:30 am

    Difficult to answer without testing it out but you might want to answer these questions:

    1) How expensive is the diff operation? Run a test or compute the complexity. If diff operation is on really large files or rapidly changing files, you might want to modify the algorithm. Storing diffs doesn’t seem like a great solution if the files are large, change little or change rapidly over time.

    2) How many times would you need to generate the same diff with the same files and is there a time bound associated with this?
    – If the same diff is generated over and over again in a short span of time, you might want to cache it and not write it to a database. If the diff is accessed sporadically over time (Few days, months), you might want to store it that is after analyzing 1 above.

    You might benchmark using costs on Amazon Web Services. Again you have choices there. You could just use a single EC2 instance for everything or split the workflow against RDS, EC2 and S3 and then analyze the cost. Depends on what level of scale you desire.

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

Sidebar

Related Questions

I know this is fairly subjective, but I'm diving into testing and learning about
I realize this is fairly abstract, but I'd like to do something not unlike
I hope this is the right place to ask. I am fairly new to
This isn't a style question. Its more about the proper use of the language
I just learned about the Template Method pattern in this answer to a question
I have looked into this fairly extensively, but have not found quite what I
This is a fairly quick question regarding schema design for a Django project. Basically,
I run into this fairly frequently. I have a batch of data (stored in
I'm trying to use this fairly standard line of code in my app: [[UIApplication
I'm a beginner at SQL and have this fairly easy conditional problem: Every installation

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.