[erlang-questions] Dangers of generating a large erlang module

Valentin Micic valentin@REDACTED
Sun Sep 29 13:19:21 CEST 2013

> I prefer the idea of generating and loading code to, say, updating a database table, because it seems faster and less likely to lead to bottlenecks.

Your statement seems a bit counter-intuitive.

I think you'd need to read data from somewhere in order to generate the code which incorporates such data.
Then, you'd need to compile and load thus generated code.
Finally, you'd need to execute this code in order to update the database.

Needless to say, you'd need to repeat the whole cycle whenever data changes.

What am I missing? 
Assuming that generated code executes faster (which we cannot know for certain), and thus not a bottleneck itself; wouldn't it be reasonable to predict that the whole process of code generation, etc. would be even bigger bottleneck?

Kind regards


More information about the erlang-questions mailing list