Resource pack I’m using was just an example. It doesn’t matter. I created a completely new one with button textures only and experimented more. I found that the issue doesn’t depend solely on the sprite size. For example, if I change border width to 1, the fps is higher than if border width is 4, like in my example(I forgot to include this), but it’s still 2 times lower than if sprite was 20x20px and not 10x10px. It might be a side effect of using nine slice. Though I don’t see any difference if I change border width and use 20x20px sprite.
Resource pack I’m using was just an example. It doesn’t matter. I created a completely new one with button textures only and experimented more. I found that the issue doesn’t depend solely on the sprite size. For example, if I change border width to 1, the fps is higher than if border width is 4, like in my example(I forgot to include this), but it’s still 2 times lower than if sprite was 20x20px and not 10x10px. It might be a side effect of using nine slice. Though I don’t see any difference if I change border width and use 20x20px sprite.