Open Bug 1647955 Opened 1 year ago Updated 1 year ago

ipdl generator is slow


(Firefox Build System :: General, task)



(Not tracked)


(Reporter: glandium, Unassigned)


(Blocks 1 open bug)


Similar-ish to bug 1646937, is slow, and takes close to 14s on my machine.

Between 10 and 15% of it is due to

Depends on: 1648129

Currently, IPDL wants to compile everything in one giant invocation; I think this is an artifact of the days when IPDL envisioned doing some sort of consistency checking on the protocols and their associated states. We've basically ditched that model, and so there's really no reason why IPDL files couldn't move to a separate compilation model, ala XPIDL -- maybe going a little further and requiring forward declarations of all protocols involved, since you generally don't need to know what the protocols you're referencing are actually doing.

I don't know if that would speed things up, and you still need some sort of compilation step to generate all message enums and so forth (similar to what XPIDL has for xptdata.cpp and so forth), but you could at least parallelize more aggressively.

How much time is spent in the front end compared to code generation? The easiest thing to do would be to keep the current behavior where it loads other files during type checking, but code generation is done per-file. (Disclaimer: I'm saying this as somebody who knows about the front end, but nothing about the code generation.) A drawback would be that it would increase the total CPU time as frequently included IPDL files would get parsed a gazillion times. My concern is that forward declaring everything would be a bit of a pain. Don't forget about the .ipdlh files that tend to have a ton of declarations.

You need to log in before you can comment on or make changes to this bug.