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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:34:41+00:00 2026-05-31T19:34:41+00:00

I’m using ajax requests to populate modal popup windows with data that users have

  • 0

I’m using ajax requests to populate modal popup windows with data that users have filled out. The popup windows are just div layouts i’m showing/hiding with jquery. There’s definitely some delay in this process. As having the popup window wait until the data is retrieved breaks the user flow as it’s easily 4 seconds of waiting for something to happen. So I bring up the popup, than I make the ajax calls. There’s a couple seconds of lag time here as the data gets filled in. I’m not sure that prepopulating data makes sense either, as there’s potential for a lot of different combinations of data depending on what the user is doing. The queries being called are all fairly simple.

I know there has to be better methods of doing this. And I know it doesn’t help that instead of having robust class definitions that return everything in 1 call, that there are a couple calls currently being made each time I need to retrieve data. But passed that, I have no idea how I should be doing this.

Here is one of many examples. I’ll make the ajax call like so:

openPopup();

            Ext.Ajax.Request({
                action: 'retrieve_last_config',
                stage_id: stage_id,
                success_fn: function(response) {
                    Ext.each(response.config_data, function(result) {
                        if(result != null) {
                            $('#stage-due-date').html(result.date_due);
                            $('#stage-email-body').html(result.email_body);
                        }
                    });
                }
            }); //end ajaxRequest

The above is passing an id to a function that looks like this:

function retrieve_last_config($request) {

$last_config = stage_config::getLatest($request->db, "WHERE stage_id='{$request->stage_id}'");

foreach ( $last_config as $config ) {
    $config_data[] = array(
        'id' => $config->id,
        'stage_id' => $config->stage_id,
        'template_id' => $config->template_id,
        'date_due' => convertDateFormat($config->date_due),
        'email_body' => $config->email_body,
        'send_email' => $config->send_email,
        'create_date' => convertDateFormat($config->create_date),
    );

}

return json_encode(array('status' => 'OK', 'config_data' => $config_data));
}

I’d be happy to dig even deeper, with class definition etc. But I figured this would give enough of idea. Am I way off base as far as my approach? Any help is appreciated, thank you!

  • 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-31T19:34:41+00:00Added an answer on May 31, 2026 at 7:34 pm

    The high-level approach is fine. For performance problems, you start by measuring where time is spent. Without these details, we could all speculate but you’ll want to actually measure all of this anyway.

    Questions you want to answer:

    • How much time is spent retrieving the data on the server?
    • How much time is spent doing the json_encode?
    • How much data is going over the wire?
    • How long does that take?

    Answer these questions and you’ll know what to fix.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have some data like this: 1 2 3 4 5 9 2 6
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't

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.