Am 20.02.2014 18:24, schrieb Dicebot:

tl; dr: the way vibe.d currently uses exceptions is completely unacceptable and is most notable existing performance killer.

To make usage of exceptions viable for control flow you need two changes:

1) Use preallocated (immutable if possible) exception instances. This can be done in user code and vibe.d own code

This can be done in certain instances, but only if the exception is
immutable (at least logically immutable), and those cases are few. It
can happen quite often that an exception is stored temporarily and then
rethrown or that the data it contains is processed further. Having the
exception possibly change during that time is unacceptable - especially
in the context of concurrent tasks that may trigger the same exception.

I definitely think that 2) is the absolute minimum that has to be done
(it would probably even be enough to resolve symbols for the stack trace
lazily). And probably when that is done, there isn't even a real problem
anymore (the 404 case should still be changed).