GNOME Bugzilla – Bug 564048
Split symbol-db-engine into several files
Last modified: 2008-12-20 18:00:38 UTC
symbol-db-engine.c is about 8600 lines which is far to much to have any sensible structure. This file has to be split up into several files with about 1000-2000 lines. This may envolve some refactoring but otherwise I assume maintaince won't be possible any longer. BTW, there are several g_tree_compare() methods with exactly the same code - instead a single instance (maybe in symbol-db-utils.c) should be used.
(In reply to comment #0) > symbol-db-engine.c is about 8600 lines which is far to much to have any > sensible structure. This file has to be split up into several files with about > 1000-2000 lines. This may envolve some refactoring but otherwise I assume > maintaince won't be possible any longer. well the structure exists, even if it's not suddenly visible. Functions are ordered and grouped with a logic in mind. The first ones are for general purposes, then there are the populations ones and at the end the iteratable queries. I agree anyway that it'd be easy to split up the file. > > BTW, there are several g_tree_compare() methods with exactly the same code - > instead a single instance (maybe in symbol-db-utils.c) should be used. > yep could be an idea.
I splitted the symbol-db-engine.c into symbol-db-engine-utils.[ch], symbol-db-engine-core.[ch], symbol-db-engine-queries.[ch], symbol-db-engine-priv.h removed symbol-db-engine.c and modified symbol-db-engine.h now to use symbol-db-engine one can just include symbol-db-engine.h. symbol-db-engine-core.c is still a 5700 lines file, but this is the core, and splitting it up more would just untidy and complicate the things.