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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:34:22+00:00 2026-05-23T16:34:22+00:00

due to performance reasons we refactored some quick ‘n’ dirty implementation of our data

  • 0

due to performance reasons we refactored some quick ‘n’ dirty implementation of our data access (sql).
As before we accessed our objects step by step. First the basic data, than filling that up, with some related data, which might be filled up itself with some other relating data.

As of now all data is accessed in single sql statements, which are more complex, but not too much – with four joins tops.

As a consequence, the data we retrieve isn’t in a object like format (actually nested arrays), like

prop1
prop2 -> prop2a,
         prop2b -> prop2b1
                   prop2b2
prop3 -> prop3a
         prop3b

and instead the data is all “flat”, like

prop1
prop2a
prop2b1
prop2b2
prop3a
prop3b

My oo-instincts tell me to preprocess this data after retrieval and send it to the frontend (html, js – which is our only client) in the object-like structure as it has been send before the refactoring. On the other hand, performance reasons implie to only process as much as really needed and if possible let the client do some worklifting.

Bottomline: What’s generally speaking the best / a good practice here?

a) process data preparation in the backend

b) send the data as retrieved to the frontend and process it there

c) switch to a ORM architecture as quick as possible

Big Thanks,

Robson

  • 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-23T16:34:23+00:00Added an answer on May 23, 2026 at 4:34 pm

    Given all of the apps I have worked with for over 20 years, performance is always king. You should always let the RDBMS do its job by using joins and whatever you need to do in the backend to retrieve only the data you need (note: you may need to look at “explain plan” or equivalent or add indexes on tables to get the best performance).

    Regardless, only retrieve the data you need. By retrieving more data you then add more data “over the wire” and then have to process and remove data on the front end.

    As for ORM – it’s a model that is often followed and I too believe strongly in using an ORM tool, but don’t create objects just for the sake of creating objects. If I can return 100 rows of data of exactly what I need vs. returning 100 related objects I would much rather (for performance reasons) return the former.

    My vote is a). I always like to do as much work on the backend since you may in the future have different types of clients.

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

Sidebar

Related Questions

Due to performance reasons I can't use the ORM query methods of Django and
due to performance reasons I didn't feel like using fstream for just one time.
Due to repetitive errors with one of our Java applications: Engine engine_0: Error in
Due to lack of capital and time we are having to do our game
I am currently resolving a performance degradation issue due to heavy lock contention. I
I have an activity which has some text views and other data to be
Due to the MS Access database file generating a .ldb lock file when the
Due to continuing crash problems, I'm about to uninstall and reinstall my copy of
Due to the lack of clientaccesspolicy.xml, there appears to be problems with using Amazon
Due to company constraints out of my control, I have the following scenario: A

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.