snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Tuning performance

Open mtucker6784 opened this issue 11 years ago • 7 comments

Hey there! This is a question, not a bug or anything.

I've said it before, will say it again, I sure do appreciate your app, @snipe!

I have a little over 5,000 records in my asset database and the performance is pretty poor (about 20 seconds to load the table when going to the "Deploy" page.) I've looked at the controllers and think I can manipulate some statements that may help performance, but before going that route, I wanted to see if anyone else had any good ideas. The machine itself has pretty sufficient resources, so not sure what else I can look at.

I'm using MySQL, Apache and used the installation methods as described by the install documentation.

Thanks!

mtucker6784 avatar Jul 27 '15 21:07 mtucker6784

Hey there - as far as I know, what you're seeing isn't a query tuning issue, it's actually a result of the way Datatables handles server side requests and how the search works. (We're already eager loading, and selecting specific columns, etc etc).

When you're fetching that page, you're grabbing all 5000 records (and that's by design, so the search filtering works), but it also means you're loading up a huge JSON blob and then waiting for the DOM to sort it out. We're exploring a replacement for Datatables currently, as we know this is an issue.

snipe avatar Jul 27 '15 21:07 snipe

No problem. Thanks for the quick reply. I was just curious about it; so nothing else I can do on my end for the time being? If not, that's alright, I'll just tell 'em that's how it is for now.

mtucker6784 avatar Jul 27 '15 21:07 mtucker6784

You are absolutely welcome to play around and see if you can get performance gains - I'll never stop you :) I just wanted to share what we've already figured out to save you a little time. By all means, poke around see what you can come up with. It's a priority for us, as soon as we get 2.0 shipped (which should be any day now, I hope.)

snipe avatar Jul 27 '15 22:07 snipe

Good deal, thanks Snipe! have a good day out there.

mtucker6784 avatar Jul 27 '15 22:07 mtucker6784

You too! And if it helps, @madd15 is currently exploring Bootstrap Table as a possible alternative to Datatables. We don't yet know if that will help the loading times, but it will at least give us responsive tables back, which we lost when we added the ability to select which columns to show. http://issues.wenzhixin.net.cn/bootstrap-table

snipe avatar Jul 27 '15 22:07 snipe

You can see some of our experiments on https://github.com/snipe/snipe-it/tree/bootstrap-table-experiment

We're going to have to build out the backend to handle the various text queries (which sucks, and we've been putting it off for a while, but there's no other way to do it), but we have the pagination working, and it's very fast (since we're actually paginating on the server's side instead of forcing the browser to handle thousands of records at once).

If you're interested in helping out, @madd15 and I have been messing around with it in the Gitter channel.

snipe avatar Jul 28 '15 05:07 snipe

Great, appreciate the info! I may hinder the process more than I can help, but I'd love to get in there and participate.

mtucker6784 avatar Jul 28 '15 13:07 mtucker6784