So far the best thing to do is to move the wall sprites where the player is looking with the help of "rays". And I also reduced the number of "bases" and wall sprites. There is an example of this optimization:
there are only ~ 700+ (wrong in the first time) bases and 720 wall sprites. Sorry for my English))