mqtt_cpp icon indicating copy to clipboard operation
mqtt_cpp copied to clipboard

gcc 8.3.0 high memory usage

Open kodidu opened this issue 3 years ago • 3 comments

Hello!

Compiling the simple subscriber example integrated into my application consumes additional 4GB+ RAM when compiling with gcc version 8.3.0. I could also find #522 about that. But simply reducing the parallel build is no solution. Last time I tested this lib v9.0.0 was used.

Was this issue addressed between v9.0.0 and v12.0.0?

kodidu avatar Oct 31 '21 10:10 kodidu

No. But some of updates could change memory usage. I think that 4GB is too small. mqtt_cpp doesn't focus on reducing compile time memory usage, so far. I recommend that add memory on compiler environment. If it is embedded environment, use cross compiler.

clang++ might use smaller memory, I'm not sure.

redboltz avatar Oct 31 '21 10:10 redboltz

I'm very sad to say that at this point it seems that the library is not usable in any complex projects.... It's a shame because I really liked this approach and the use of boost.asio, but the insane compilation times and memory usage make it a pain to work with.

Bart97 avatar Apr 09 '22 21:04 Bart97

Yes it is sad, I also never experienced such bad compile-time memory / cpu usage with any library. Template/header-only libraries are hard to master.

kodidu avatar Jun 18 '22 07:06 kodidu