Speed up compiler by caching text representation of project items for use in multiple targets

When you build a Xojo project for multiple targets, e.g. MacOS and Windows or e.g. macOS Intel and Apple Silicon, you see the IDE assembles all project items twice.

So for every window, every class, every module, every menu, every interface, etc. the IDE makes a test representation and sends it to the compiler.

Please consider using a dictionary or some properties there for the time of there build, where you cache this text.

So assemble it for MacOS Intel build and then reuse it for Apple Silicon.

You may know when this generated text is not the same and have exception rules when not to use cache.

But as far as I see the text is based with #if unresolved, so the text is same for various targets.

Submitted as issue: Xojo: Account Login

3 Likes

They can’t. The IDE renders code, not just copies what you’ve written, and a large portion of it is conditional based on the specific target that is being built at that very moment.

But it is passed with #if to the compiler
Maybe a Xojo engineer could have the compiler write those to disk to compare.
But it may be that for Mac Intel and Apple Silicon, they are identical.

At this very moment that is true. But there is lots of conditionally included code that doesn’t use #if. Things like:

If specialCondition then
    AddLine rendering, "something specific to this build"
End if

I’m talking about the IDE adding code conditionally when it is rendering.

Yes, no idea how often this happens and whether items could be marked to not be cached. But if 90% could be cached, it may help.