Is there a better way?
Is there a better way?
I am using DataTables to present information sourced from the Dom with a lot of links to images in the table.
I am a little concerned about performance. I tried server side processing but my limited knowledge stopped me from creating the links once I had the table populated. You can view the table here
http://www.theheffingtonpost.com/rathmoreFolio.html
Is there a better way to achieve this result? Any suggestions would be very much appreciated.
Regards
John
This question has accepted answers - jump to:
Answers
Your performance seems good, are you planning on adding a lot more data?
I use server-side and need html in my table cells as well. I actually just dump the raw html string in the server-side script that builds the json and it works well. The html in the json has to be all one string, you can't stick new lines on long strings. Make sure to escape any double quotes in the html attributes with a backslash. Here is an example:
Thank you for your reply. I won't be adding more data to that particular table, although I may have to create one with a lot more data on it.
I'll give it go and let you know how I get on.
Regards & Thanks again
John
For a DOM sourced table, I think that's probably about as fast as it will go. You could potentially try loading the data either via Ajax or using
data
to pass in an array of data, at which point you can turn ondeferRender
, which will help performance a bit, I'd agree with cramblda - the performance seems okay to me.Allan
Thanks Allen
cramblda's suggestion made me realize my mistake.
I have stuck to the dom sourced data and linked directly to the images on the server rather than loading them in hidden divs.