mysql - Django - Dojo/Dgrid - how to manage LARGE data sets -


6.30.15 - how can make question better , more helpful others? feedback helpful. thanks!

i developing web application handle/manage large data set - kind of heavy load causes browser lock - whether i'm in django rest framework api or in dojo/dgrid. kind of dual question.

i've researched , can't find clear way on either side.

how limit how database sends @ 1 time django rest framework and/ or dojo dgrid. dgrid pulls data django rest api. drf pulls data directly mysql database.

if can control how data sent @ 1 time, won't lock browser much. suggestions, advice, help, examples helpful. in advance!

updated 6.22.15 -

alright, got pagination work , display limit/offset in headers. :) yay!!!! can see data in response headers. however... grid won't populate , keep getting odd error: typeerror: transform(...) null

return transform(value, key).tostring();  instrum...tion.js (line 20) 

i've gotten error before, i've never been able find solution it. after researching, there's not can find on how fix or is. appreciated!! i'm close getting thing work correctly after weeks , weeks of beating head against wall. please help! :) in advance!!!

2nd update - answer previous post - i'm still not sure how fix it. when addressed issue - went away awhile, still have no idea how correct issue.

problem 3: "transform(...) null return transform(value, key).tostring();"  sounds largely tangential original issue, common cause widget template referencing property via ${...} doesn't exist in widget. 

i don't know how answer on layer between drf , database, discussed in other questions this one, drf allows limit amount of data sent requests via page or offset/limit parameters.

based on phrasing of question, sounds client side requesting data. i'll outline how flow should work, can spot you've missed:

  1. a dgrid instance set collection referencing dstore/rest instance
  2. the dstore/rest instance created appropriate properties set. in case, based on drf documentation:
    • userangeheaders: false (this default)
    • rangestartparam: 'offset'
    • rangecountparam: 'limit'
  3. as result, when grid renders, should see requests sent server e.g. endpoint?offset=0&limit=25 - if don't see 2 parameters, why you're getting data
  4. the server need query database respective offset , limit
  5. the server must provide response expected number of items (except if reaches end of data set first, should reflected total property in response, presuming customization in previous answer linked used)

ultimately, if service working expected, grid should requesting handful of items @ time, , should firing 1 or 2 requests @ given time.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -