Memory usage for PubSubClient

I'm going to use the PubSubClient lib to subscribe to a fairly large amount of topics (say ~1000). The topics will be stored on a CSV file on an SD card, and read in the setup. So I'd like not to hard code them.
That got me thinking, how much RAM would does subscribing to a topic use.

The library does mention a 256 byte buffer, but not sure if this is per topic, or per server.
I did try looking into the pubsubclient::subscribe code, but it goes a bit over my head.

Any help is appriciated.

I think it will be ok, at least from a library perspective. The MQTT broker will need to remember what topics you subscribed to but the PubSub client does not - it will just process what ever messages come in.

There may be an issue however when you process the messages. If you have to do different things depending on what the topic is, then you may need to topic name in memory to decide. If however, the processing is all or mostly the same whatever the topic, you may be ok.