I have the function in EXTJS which i get a store from a controller and then load it.

```
functionName: function (controller) {
return function() {
Ext.widget('callWindow');
var variable= cotroller.getCallWindowPopup();
controller.getAccountsStore().load({
params: {
source_system_id: ssid
},
callback: function (records) {
variable.loadRecord(records[0]);
}
});
}
}
```

The account store is a json store which might have few thousand records. Which of the operation is expensive here? getAccountsStore or the load method. If load is expensive how can i avoid calling it multiple times?

`getAccountsStore`

is a lookup of a reference in a collection, its immediate. `load`

of course is expensive. It loads all the data in the store, instantiating each record as a model object.

Normally, you don't need to call `load`

more than once, unless your data changes, and you want to refresh.

You can reduce the loading time, if you use a paged store. This loads only one page of data into the store. This may or may not be acceptable in your context.

Similar Questions

I have to store 500M two digit unicode character in memory (RAM). The data structure I use should have: Worst Case Space Complexity: O(n) Worst Case Time Complexity: O(1) <-- insertion, read, upda

Here is my code for the sorting the list in ascending order. I have used function within the function. Now I want to calculate the Time complexity of this function. From my side I have calculate that

Why does this fail with cannot call method 'getProxy' of undefined? { name: 'customer_name', xtype: 'combobox', fieldLabel: 'Customer', emptyText: 'ex. Google', allowBlank: false, queryMode: 'local',

I want to know what's the worst case time complexity of put/get methods of HashMap incase the object used as a key always returns hashcode as 1. In my understanding: As every key has the same hashcode

What would be the BigO time of this algorithm Input: Array A sorting n>=1 integers Output: The sum of the elements at even cells in A s=A[0] for i=2 to n-1 by increments of 2 { s=s+A[i] } return s

foo = [] i = 1 while i < n: foo= foo + [a] i*=2 What is the time complexity of this code? My thoguht is: the while loop does log(n) iteration. For each iteration new list is created. So, the tot

I need to know: What is the time complexity of HashMap.containsKey() in java?

I understand that when you multiply two time complexities, you just multiply them as usual, for example a time complexity of n log n multiplied by the time complexity of n will give you a time complex

I have an implementation of merge sort. I'm not too sure about the quality of my implementation, so I ran it with lists of N up to 6000 and graphed the time it took to sort each time. I know that merg

I need to calculate the time complexity of the following code: for(i=1; i<=n; i++) { for(j=1; j<=i; j++) { // Some code } } Is it O(n^2)?

In this implementation of a splay tree, the listed time complexity of the makeEmpty() function (which removes all elements) is O(n). It is implemented as follows: while( !isEmpty( ) ) { findMax( ); /

I am taking up algorithm course on coursera,and I am stuck on this particular problem. I am supposed to find the time complexity of this code. int sum = 0 for (int i = 1; i <= N*N; i = i*2) { for (

I used javancss to get get cyclomaric complexity of methods. It produced reports in text and xml form, easy to process method level information. For example text output is some thing like below. 1 2 2

i=n; while (i>=1) { --x=x+1; --i=i/2; } What is the running time of this code? A O(N^2) B O(N^3) C O(N^4) D O (LOG N) E O(2^N) I believe it is the option D This is for revision. Not homework

Possible Duplicate: Plain English explanation of Big O I have been doing programing for 4 years now, but i never paid attentions to what time complexity is closely. i have a interview tomorrow and i

Say I have a ArrayList with n element in this array, and I add an element at the beginning: myArrayList.add(0,'some value'); What will be the time complexity of this operation? The Java Doc doesn't s

I want to know, how i can estimate the time that my program will take to execute on my machine (for example a 2.5 Ghz machine), if i have an estimation of its worst case time complexity? For Example :

I am trying to check the time complexity of the below simple program. The program replaces spaces in a string with '%20'. The loop to count spaces (O(1) time) foreach (char k in s) { if (k == ' ') {

for(i=1;i<n*n;i++) for(k=1,l=1;l<n;k=k+2,l=l+k) foo; How would I estimate the time complexity of a construct like this?

For the following code: int func(int x, int y) { int flag=0; for(flag=0; flag<x; flag++) { .... } for(flag=0; flag<y; flag++) { .... } return 0; } for the following cases the time complexity (m

I am reading some information on time complexity and I'm quite confused as to how the following time complexities are achieved and if there is a particular set of rules or methods for working this out

A friend told me that breadth-first search algorithm (graph represented by the adjacency list) has a quadratic time complexity. But in all the sources says that the complexity of BFS algortim exactly

I am dealing with the computation which has as an intermediate result a list A=[B], which is a list of K lists of the length L. The time-complexity to compute an element of B is controlled by the para

I am little weak in regular expression. Can anybody help me in finding regular expression for time (in 24 hour format) in extjs Thank you.

void f(int n) { int x = n; while (x * x > n) { x /= 2; printf (“x cubed = %d\n”, x * x * x); } while (x > 0) x--; printf(hello %d\n, x); } I don't understan how they got complexity of TETA(sq

How do I calculate the time complexity of the following program? int[] vars = { 2, 4, 5, 6 }; int len = vars.length; int[] result = new int[len]; for (int i = 0; i < len; i++) { int value = 1; for

Assignment is to show that the time complexity is Ω(2max(n,m)) in the worst case scenario for following recursive function. Assume the following: n = w1len (length of word w1), m = w2len (length of

I've to calculate the time-complexity of an algorithm, but in it I'm calling os.walk which I can't consider as a single operation but many. The sources of os.walk left me confused as the filetree may

I am having trouble in calculating the time complexity of program shown below. It is a simple program to generate valid parentheses such as ((())) (()()) etc. However, I don't really know how to e

Can someone explain me when it comes to Binary search we say the running time complexity is O(log n)? I searched it in Google and got the below, The number of times that you can halve the search s

I am currently writing a research paper about a new steganography algorithm. I have used canny edge detector at some point in my algorithm. In the paper I need to write the time complexity of the nove

Why is the time complexity of node deletion in doubly linked lists (O(1)) faster than node deletion in singly linked lists (O(n))?

I was looking at the Wikipedia entry for Prim's algorithm and I noticed that its time complexity with an adjacency matrix is O(V^2) and its time complexity with a heap and adjacency list is O(E lg(V))

I am wondering what's the time complexity of Collections.unmodifiableList? If I want to make an incoming Collection immutable, what's the cheapest way?

Does time complexity of the following segment of program could be O(2^n)? I’m confused n=1; for j=1 to n do output(j); n=2*n; end {for}

Since i'm working around time complexity, i've been searching through the oracle Java class library for the time complexity of some standard methods used on Lists, Maps and Classes. (more specifically

What is time complexity of C#'s List<T>.Sort() I guess it's o(N) But after I searched a lot, I didn't get any accurate result.

It occurs to me that linear search is not really O(N) as one has to deal with cache misses. This leads me to wonder why linear searches are still advertised as having a time complexity O(N)? Shouldn't

In Skiena's book of algorithm design, given that the hash table has can have maximum m buckets and total number of elements is n, the following worse case time complexities are observed: Search: O(n)

I am trying to analysis time complexity of below function. This function is used to check if a string is made of other strings. set<string> s; // s has been initialized and stores all the string

I have to complete a study on analysis of digital algorithms. I need some expert ideas on the topic. I understand that two algorithms having the same time complexity are affected by the constant, say

I have a program that uses an array if integers to behave like a Stack of Integers. However, with an array, there must be a defined number of elements. When the user calls a method such as push() and

My question is simple. System.arraycopy(Object src, int srcPos, Object dest, int destPos, int length) is a native method. What is the time complexity for this method?

Below code is to find how many times a number is shown in an array. For Example: 1,2,2,2,3,4,5,5,5,5 number 2 = 3 times number 5 = 4 times. What is the time complexity in Java for the below code? What

Is there any search algorithm with time complexity O(1)? Search Algorithm = Finding an element x from n elements.

Have used this program, How to calculate the time complexity of a backtracking algo? /* Function to print permutations of string This function takes three parameters: 1. String 2. Starting index of th

I am reading the book -- Artificial Intelligence a modern approach. I came across this sentence describing the time complexity of uniform cost search Uniform-cost search is guided by path costs rath

Consider the time complexity of a post-order traversal on a binary search tree of N nodes. I know it takes O(N) to visit all the nodes, in the general case, but what is the complexity in the worst cas

I created a program that finds the median of a list of numbers. The list of numbers is dynamic in that numbers can be removed and inserted (duplicate numbers can be entered) and during this time, the

I'm working through some practice problems where I'm given a target time complexity and space complexity. One of them gives a target time complexity of O(N+M). I'm having some trouble with the intuiti