-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic loading DataTables full history of paginations on first page #256
Comments
Hey @M-Shahbaz, I guess I'm not too sure what the ultimate outcome would look like. The datatables is currently reliant on /ext/getlasttxs/:min. This command is simply just a db.get_last_txes and then it sends that out as json. ? |
I'm thinking you're after something like this: app.js
database.js
index.jade
|
@M-Shahbaz here's an example of the server-side I detailed above: note this isn't an apples to apples comparison, as vulc-test is running a modified version following what I'm trying to do for #252 , whereas vulc is running ciquidus. So neither of them are vanilla iquidus-explorer. |
@uaktags Thanks, that's exactly I was looking for. app.js
|
Great catch on the query.length!
|
Also, to tie in the settings parameter:
|
That's even better! |
@uaktags we can implement similar dynamic loading for address transactions history table. Currently We can store complete transaction history of an address and dynamically load address transactions history, which can improve:
e.g get_address_txs_ajax: function(hash, start, length, cb) { Address.findOne({a_id: hash} , { txs: { $slice: [ Number(start), Number(length) ] } }).exec(function(err, address){ if(address) { return cb(address, address.txs.length); } else { return cb(err); } }); }, |
By removing the |
While storing all transactions history of an address, BSON document size is limited to 16MB only and ignoring all latest transactions of the address after 16MB BSON document size limitation and would require an alternate approach to store data for address transactions e.g: GridFS |
Hey @M-Shahbaz , sorry I haven't been working on this in a few weeks as I took on another client that's finally finishing up. I do like the idea of GridFS to overcome the BSON, as this probably affects the extendability of options as well as affects larger coins like BTC, more so than any of the use cases I've used it for. So AddressTX is the storage of all of these transactions. Looks good. Hows the testing been playing out in terms of before and after results with your used coin? |
Hey @uaktags , thanks for your response. I also tried with BSON, it was very slow process and was ignoring transactions after 16MB limit and storing only around 150K transactions history of the above same address, that's how I found out the limit. The white space added by my IDE I think and hiding white spaces with GH feature is showing the code update PR#270 mainly: 1-AddressTX - new collection to store full address history An example of the server-side I detailed above (including address full history and full transactions): |
This is included in #319 now, nearly ready to merge. Thank you for all your work! |
Merged in 8d44d4a thanks @M-Shahbaz ! |
Currently first page is showing only no. of entries set by the config settings "last_txs" or full if not specified.
Is there a way to implement DataTables server side processing: pagination of all blockchain data till start for fast loading.
The text was updated successfully, but these errors were encountered: