Project

General

Profile

Feature #7360 » fix-performance-when-rendering-sidebar-v2.patch

Go MAEDA, 2021-08-03 04:25

View differences:

app/helpers/queries_helper.rb
465 465
      else
466 466
        {}
467 467
      end
468
    default_query_by_class = {}
468 469
    content_tag('h3', title) + "\n" +
469 470
      content_tag(
470 471
        'ul',
......
473 474
          clear_link = +''
474 475
          clear_link_param = {:set_filter => 1, :sort => '', :project_id => @project}
475 476

  
476
          if query == query.class.default(project: @project)
477
          default_query =
478
            default_query_by_class[query.class] ||
479
            default_query_by_class[query.class] = query.class.default(project: @project)
480
          if query == default_query
477 481
            css << ' default'
478 482
            clear_link_param[:without_default] = 1
479 483
          end
(12-12/14)