views:

355

answers:

2

Hi all,

I use boost.test library to write unit tests for my application.

The problem is, when one particular *.cpp file containing test suite grows up to certain size, compilation of that file becomes extremely slow.

I use BOOST_AUTO_TEST_CASE macro to define test cases.

Boost version is 1.34.1

Build env is autotools + gcc 4.3 under Fedora 9.

I will highly appreciate if somebody will point out possible reasons of such behaviour.

+1  A: 

You might run out physical memory and the system starts using the swap (file/partition) a lot more intensively than normaly (thrashing).

grivei
Well, it does use more memory then usual. But it is rather consequence not reason. The question is why does it use that much of memory?
Oleksii Novikov
+1  A: 

One way to try to find out what is going on is to use gcc option -Q and see where is the difference between normal and extremely slow case.

Laurynas Biveinis