Re: Long start-up time of a program with include std/

new topic     » goto parent     » topic index » view thread      » older message » newer message
Insolor said...

Why the start-up time of the third program is so long? I guess it is because of the new advanced preprocessor features, used in the standard includes, am I right? Is there any workaround?

It has nothing to do with preprocessor functionality.

Eu4 parses every line of code in the application, converting them to IL (intermediate language) before executing the first line it has to. It does this for a few reasons, including

  • Ensuring that the program will not run if there is any coding mistake in it,
  • Ensuring that all forward references can be resolved.

The included file std/console.e is a large file that in turn includes other standard library files, which include still other files and so on. This means that when using the std/console.e module, your application will parse and convert many thousands of lines of code ... in case your application might need them.

The work around is to create your own version of console.e that only contains the things that your application actually needs. Note that when you bind or translate-to-C, the resulting application not only removes the parse-convert steps, but also strips out routines that your applications will not need.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu