SearchPanes are slow

SearchPanes are slow

pybcgpybcg Posts: 41Questions: 10Answers: 0

I have a lot of data and a lot of columns at work in my tables. Is there any way to speed up the refresh of the searchpanes? Or is there a way we could make it async so it doesn't freeze the table while it's loading?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Out of interest, how big are we talking here, for both the rows and columns?

    Colin

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pybcg ,

    You've asked similar questions before - see this thread. Are we still talking about the same setup?

    I had asked for a test case there to see if we could spot anything that might be slowing your specific setup down, but you didn't provide one there... Having one would probably be the best thing that could help us here.

    How many SearchPanes are you trying to initialise? You can speed things up using the searchPanes.columns initialisation option.

    Thanks,
    Sandy

  • pybcgpybcg Posts: 41Questions: 10Answers: 0

    @sandy @colin I will attempt to recreate the problem using datatables live. Would you guys happen to have the link to a datatables with 1) large data and 2) datatables editor and 3) inline checkbox (https://www.gyrocode.com/articles/jquery-datatables-how-to-add-a-checkbox-column/)? If not #3, np.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Not with large data, or Gyrocodes checkboxes, but this is an example using Editor that you should be able to tweak,

    Colin

  • pybcgpybcg Posts: 41Questions: 10Answers: 0

    @colin @sandy I see in the manual examples of using searchpanes with 50K+ rows, and even then it's slow. How do you solve the speed problem in that example? https://datatables.net/extensions/searchpanes/examples/performance/cascade50k.html

    Do you have to move this serverSide?

    Random q here: When I make an edit in my editor, the searchpane gets kicked off. Is this an asynchronous function? I feel like it's not because the window stops until the searchpane is done loading.

    On my end, I will try to do my best to replicate the issue.

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pybcg ,

    As I said in your other thread - searchPanes.cascadePanes does have a sizeable performance impact. For that many rows I would recommend moving to using server-side processing.

    I don't understand what you mean by

    the searchpane gets kicked off.

    A test case would help us to understand that.

    Thanks,
    Sandy

  • pybcgpybcg Posts: 41Questions: 10Answers: 0

    @sandy
    Searchpane gets kicked off --> I believe when I make an edit, ALL the searchpanes get refreshed; this is the case, correct?

    Before I try to make serverSide work, do you know what the performance difference will be? I don't know if I want to add a ton of server side code if it's marginal.

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @pybcg ,

    I believe when I make an edit, ALL the searchpanes get refreshed; this is the case, correct?

    Yes, there is some code that runs on each preDraw to ensure that the SearchPanes are kept up to date. This has to happen, otherwise SearchPanes would show inaccurate options as options to the user. If you are using searchPanes.cascadePanes or searchPanes.viewTotal then there is another sizeable chunk of code that runs to supply the functionality that those options provide.

    Before I try to make serverSide work, do you know what the performance difference will be? I don't know if I want to add a ton of server side code if it's marginal.

    For 50k rows, the performance difference should be sizeable. I can't give you an exact figure for obvious reasons, but it should be significantly faster than trying to run 50k with cascadePanes on the client side.

    Thanks,
    Sandy

  • pybcgpybcg Posts: 41Questions: 10Answers: 0

    After investigation, I will move processing to the serverSide. Thank you all for your help!

This discussion has been closed.