Question

I am writing an angular application, and I'm wondering how much client side memory to use....

I am writing an angular application, and I'm wondering how much client side memory to use.

I'm currently working on a scenario where there are 2 dropdowns. The second will load new values depending on the selection of the first. I'm thinking the max # of total records in the 2nd dropdown would be around 2000-3000 items, each being around 2k each. Each selection would display probably 10-15 items of the 2000-3000.

Should I load the entire array into memory and parse the selected values from there, or should I read from the server every time the first dropdown changes?

I know for a desktop this wouldn't be a big deal. But we support phones and tablets, and I'm not sure how much memory to worry about with these devices.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

What you're describing is called a "cascading dropdown." It's commonly used by car websites to get Year, Make and Model.

I've seen a lot of these sites do an AJAX/JSON round trip for the sub-combos. There's a bit of a lag if you do this, unless it happens before the user opens the second dropdown. On a phone, I think you should probably do that instead of loading all of the items. Phone users are already used to things happening a bit more slowly.

In any case, make sure you can get the server to send only the 20 bytes per entry that you need for the dropdown. If you can't get it to do that, then taking the hit for all 2000 complete objects is probably out of the question (that's 4 megabytes, just for one page).

Add a comment
Know the answer?
Add Answer to:
I am writing an angular application, and I'm wondering how much client side memory to use....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need help with this code, I'm stuck on it, please remember step 4, I'm very...

    I need help with this code, I'm stuck on it, please remember step 4, I'm very much stuck on that part. It says something about putting how many times it appears Assignment #1: Sorting with Binary Search Tree Through this programming assignment, the students will learn to do the following: Know how to process command line arguments. 1 Perform basic file I/O. 2. Use structs, pointers, and strings. Use dynamic memory. 3. 4. This assignment asks you to sort the...

  • Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers...

    Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers Sometimes we're given an array of data that we need to be able to view in sorted order while leaving the original order unchanged. In such cases we could sort the data set, but then we would lose the information contained in the original order. We need a better solution. One solution might be to create a duplicate of the data set, perhaps make...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT