sidebars calculation optimization