Would it be an advantage, to use DCE feature?

I was reading about DCE here : http://haxe.org/manual/cr-dce.html
It looks more like an optimization feature. So,does that mean, it’s recommended to use it always, especially for javascript output ? Would it have a noticeable advantage on performance and speed of final output ? Are there disadvantages ?

You can get a better loading time since there’s less code to parse,
you’ll get a better size, but you won’t get better speed.

If you use reflection it could break stuff, since if a class isn’t used it’s removed by dce.

It’s activated when you do lime test html5 -final.

1 Like

Its also probably worth adding that you can use @:keep to annotate a method/class and it wont be removed from DCE

1 Like

reflection ? You mean referencing a library ?

It refers to the access of data by name.


Ok. Thanks. Yes, that makes sense.