On creation, each wall should be assigned to a region (maybe an array or list or chunk). These sections are part of the world map as opposed to being part of the camera.
As each moving object (tanks and bullets) moves, they should each determine which region they are in. There are many ways to do this and lots of room for optimization... but don't get focused on that too early, just get the system working first.
When each moving object knows what region it is in, now do your collision check against all the objects (moving and stationary) in that region as well as the neighboring regions.
For example, tank 1 knows it is in region 134 (how it knows this will depend on your design... maybe it's camera position plus tank position or maybe your tanks have real world coordinates), and knowing that, it then checks for collision against walls in and tanks in regions 133, 134, 135, 212, 211, 210, and the 3 regions north as well. No need to check 213's walls and tank 4, or the hundreds of other regions' tanks and walls and bullets. Tweak and optimize region sizes and even regions within regions until your performance goals are met.
That's the idea. The specifics will depend on your particular case and since I don't know c# or whatever it was you said you are using I can't offer any specific help anyway.
edit
You also mentioned that your geometry is complex. I sense this is a potential source of problems. You know what a bounding box is? Your collision check should not even be checking the complex geometry unless the bounding boxes are intersecting. This is effectively putting each object into its own "region". Now you are just checking a bunch of potentially intersecting rectangles which is much cheaper than checking complex geometry. Does your programming language utilize something like bounding boxes? If not, you can make one. A bullet would have properties that update each game loop like _corner1,corner_2,corner_3,corner_4 or maybe just _boundingBox. Unless bullets are just point objects (which is even better). But bounding boxes could be used for tanks or non rectangular walls.
Also, try to limit the collision checks to in camera or near camera objects. This could just be a Boolean flag:
if(tankArray[i]._nearCamera==true){//run collision check logic} 