Skip to content

Conversation

@paolopas
Copy link
Contributor

removed unnecessary declarations in engine headers results in 9% decreasing of compilation time and
roughly 17% decreasing of dependencies among sources.
All forward declarations are collected in jam_fwd.h header file.

Now you can think about cleaning up the individual sources from all unnecessary includes, and this should also bring several benefits.

Note

Replaces #532

removed unnecessary declarations in engine headers
results in 9% decreasing of compilation time and
roughly 17% decreasing of dependencies among sources
removed unnecessary declarations in engine headers
results in 9% decreasing of compilation time and
roughly 17% decreasing of dependencies among sources
removed unnecessary declarations in engine headers
results in 9% decreasing of compilation time and
roughly 17% decreasing of dependencies among sources,
all forward declarations are collected in jam_fwd.h
@paolopas paolopas mentioned this pull request Jan 31, 2026
Copy link
Member

@grafikrobot grafikrobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good except for two things:

  • I prefer moving to using. Eventually I want to rework all the typedefs accrodingly. But one small step at a time.
  • You need to undo the jamgram.* changes. Or upgrade to a newer Bison version (preferably the same one I use -- 3.8.2).

Thanks for doing all this cleanup!

*/

// frames.h
typedef struct frame FRAME;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible do using A = B;. In this case do:

struct frame;
using FRAME = frame;

Same applies for the other typedef's here.

#include "value.h"

using OBJECT = b2::value;
typedef b2::value OBJECT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the using.

@paolopas
Copy link
Contributor Author

paolopas commented Jan 31, 2026

I didn't make the changes to jamgram, and to be honest, I'm quite annoyed by these unwanted changes, forced pushes, conflicts, and other merges. I've never had all these problems.

Every time I did a pull, I found the topic branch polluted with commits that had nothing to do with this work, which forced me to resolve conflicts or, even worse, to have to double-check each modified file one at a time...

This way of working is profoundly disrespectful of the work of others. If I create a topic branch, I obviously want to isolate some changes from everything else.

@paolopas paolopas closed this Feb 1, 2026
@paolopas paolopas deleted the gnurant-4 branch February 1, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants