Inefficient smart linking of external classes

Issue #138 resolved
Christian-W. Budde created an issue

While smart linking is a very useful feature, it turns out to be somehow inefficient with external classes as it starts to eliminate every membe one by one.

For small projects the overhead might be neglectable, but already for a medium sized project, which uses a typical set of external definitions (for W3C HTML definitions or other external resources) it might result on some pretty overhead (2s vs. 14s for a big project on my machine), especially since these classes do typically generate zero output code anyway.

So eventually it might make sense to skip external classes in the smart link step to increase the performance.

Maybe something like:

procedure TdwsCodeGen.SmartLinkFilterStructSymbol(structSymbol : TCompositeTypeSymbol; var changed : Boolean);
[...]
   if structSymbol.IsExternal then Exit;
[...]

Comments (1)

  1. Log in to comment