[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Vineet
I tried doing like this:-- In controller-- def get_data(): custdata = db.executesql(qry, as_dict=True) return response.json(custdata) And in View, other code is as earlier (hence omitted) sAjaxSource: {{=URL('MIS','get_data')}}, Still, the dataTable is blank. Pl. help. ---Vineet

Re: [web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Vasile Ermicioi
try def get_data(): custdata = db.executesql(qry, as_dict=True) return response.json(custdata.as_list()) also go to this link http://yoururl/app/controller/get_data you should see a json response

Re: [web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
On Saturday, June 25, 2011 1:07:39 PM UTC-4, elffikk wrote: try def get_data(): custdata = db.executesql(qry, as_dict=True) return response.json(custdata.as_list()) He's already using as_dict=True in the executesql call, so doing custdata.as_list() shouldn't be necessary.

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
Is MIS your app name, or the controller name? If it's the app name, your URL call also needs the controller name, or it will think MIS is the controller and the Ajax call will fail. On Saturday, June 25, 2011 1:02:50 PM UTC-4, Vineet wrote: I tried doing like this:-- In controller-- def

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Vineet
a='MyWheels', c='MIS', f='get_data'. So, {{=URL('MIS','get_data')}} should work. But I do not get the data in dataTable. ---Vineet On Jun 25, 11:13 pm, Anthony abasta...@gmail.com wrote: Is MIS your app name, or the controller name? If it's the app name, your URL call also needs the controller

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
What happens if you go to /MyWheels/MIS/get_data? Do you get the proper JSON returned? If so, then the problem is probably in your client-side JS code. Also, on the client side, check in Firebug (or similar) to see if the Ajax call is getting made properly, and if it is returning the JSON. You

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
Note, you might also check out PowerTable ( https://bitbucket.org/rochacbruno/powertable), which is a web2py plugin for DataTables. There's also a jqGrid widget that's part of plugin_wiki (you can use it even on non-wiki pages) -- see http://web2py.com/book/default/chapter/13#Current-Widgets.

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-24 Thread Vineet
As suggested by the community, I am trying to export json data to dataTable. But only blank dataTable is rendered (with desired formatting, search box, etc.) Pl. introspect into my code as to where I have a mistake. Data is not displayed (as returned by get_data method). I have made sure that the

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread Vineet
Ref. to issue 307 in google code. http://code.google.com/p/web2py/issues/detail?id=307sort=-id As suggested by Caleb, I prepared the HTML myself (in the controller). Then returned the generated html to the View and rendered it there. == My finding:--- == Still it takes long time

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread pbreit
If you really need to return 10,000 records to the browser, you should be returning json and then rending with some sort of data grid.

Re: [web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread Sebastian E. Ovide
why you need to return 10k records in one go ? -- Sebastian E. Ovide

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread Vineet
@Sebastian, @pbreit, I understand what you mean to say. If I get you rightly, I should fetch only a limited no. of rows through pagination. It makes sense for most of the situations. But for some cases, rendering all the records on single page is required. e.g. consider a big automobile workshop.

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread pbreit
We used YUI DataTables at my last company and they worked really well but we only got up to around 1000 records on a page (with very quick paging, filtering and sorting). I've been wanting to hook them up to Web2py but haven't needed it so far. http://developer.yahoo.com/yui/datatable/

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread Chris May
Have you tried pasring the data using your 0.078 second method into a json format and using jQuery to parse it?

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread Anthony
Maybe check out DataTables new virtual scrolling feature: http://datatables.net/blog/Introducing_Scroller_-_Virtual_Scrolling_for_DataTables. I think jQgrid may have a similar feature as well. Anthony On Tuesday, June 21, 2011 1:26:50 PM UTC-4, Vineet wrote: @Sebastian, @pbreit, I

Re: [web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread Jason Brower
Or print it. I have had to do massive amounts of data in html and pdf format. BR, Jason Brower On 06/21/2011 08:26 PM, Vineet wrote: @Sebastian, @pbreit, I understand what you mean to say. If I get you rightly, I should fetch only a limited no. of rows through pagination. It makes sense for

Re: [web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-21 Thread contatogilson...@gmail.com
It can paginate data? _ *Gilson Filho* *Web Developer http://gilsondev.com*

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-15 Thread cjrh
Raymond Hettinger recently tweeted that .join() was O(n) but concats are O(n^2), or some other super-linear factor like that, so your speedup makes perfect sense. I think you've discovered a performance bottleneck in the rendering system of web2py. Shouldn't be too hard to find with a

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-15 Thread Massimo Di Pierro
Please open an issue in google code and link this thread. This should be improved. On Jun 15, 8:59 am, cjrh caleb.hatti...@gmail.com wrote: Raymond Hettinger recently tweeted that .join() was O(n) but concats are O(n^2), or some other super-linear factor like that, so your speedup makes

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-15 Thread cjrh
Hi Veneet Following Massimo's recommendation that an issue be opened, I have taken the liberty of creating one on your behalf here (Issue 307): http://code.google.com/p/web2py/issues/detail?id=307sort=-id I am impatient and I couldn't wait. Please bookmark the issue and follow progress

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-15 Thread Vineet
Caleb, Thanks for opening an issue on my behalf. I am eagerly following the developments on this. Thanks, Vineet On Jun 15, 7:29 pm, cjrh caleb.hatti...@gmail.com wrote: Hi Veneet Following Massimo's recommendation that an issue be opened, I have taken the liberty of creating one on your

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-15 Thread VP
for i in custdata:    mystr2 = ''.join([mystr2, 'trtd' , str(i[0]) , '/td']) ... lst = [ jn(['trtd' , str(i[0]) , '/td',            'td' , str(i[1]) , '/td',            'td' , str(i[2]) , '/td',         .. more omitted..]) for i in res] mystr=jn(lst)