سؤال

Is it an expensive operation to create Ext.data.Store objects, because I quite often create stores just for retrieving data once.

هل كانت مفيدة؟

المحلول

It will depend on the quantity of data you're retrieving and how you use it in your application.

You need to weigh up the overheads with calling data from you datasource more than once, with the overhead of storing it on the page and using it client side.

Using stores just to retrieve data once isn't a problem really as the store is just a client side d collection of data. There isn't really much weight to them.

It may also be worth knowing that if you're using ExtJS4 and you're talking about retrieving a single data item, rather than a collection of items, you can create a single 'model' and interact with that rather than a store, which would be a lighter solution.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top