Calls of GetSize() from my implementation of AbstractListModel significantly decrease application performance.

asked 2023-11-10 21:17:23 +0800

KlimDM gravatar image KlimDM

Here is my code for getSize() method:

    public int getSize() {
        return sessionRepository.getCountByPartnerOperatorCountPhoneFromTimeBeforeTime(
              selectedPartner, selectedOperator, fromTime, beforeTime, hideNullStatistic);

Parameters in method call are filters, so when executing code in viewModel with implementation of AbstractListModel, this method is being called many times, every time executing a query to a db. Thus, with ~26000 rows in table, it takes about 10 min for a page to render.

Is there any way to overcome this problem (maybe make zk not to call getSize() so often or use different component)?

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2023-11-10 21:17:23 +0800

Seen: 3 times

Last updated: Nov 10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More