On Thursday, 31 July 2014 at 14:02:28 UTC, Johannes Pfau wrote:

Awesome!

Will this be added to code.dlang.org?
There's a question on reddit regarding performance. I'd guess
performance should be quite good in general, but the simple example throws/allocates* Exceptions on missing files. Does this perform well
enough?

* I guess in this case you could 'cache' the exception in a
global variable, but druntime still allocates the stack trace (only once though). Druntime uses some tricks to avoid these allocations for OutOfMemory errors and this trick should probably work for dfuse as well, but I still wonder if it isn't easier to simply return a
  result code from getattr and readdir.

Hi Johannes,

the choice of using throw for exception was mostly to follow the python-fuse bindings which we initially used for a prototype. I agree that we could instead return a value for performance considerations. However there is a balance of how many errors you expect and, as far as I am concerned, the more convenient way of reporting errors using exceptions up the callstack.

Reply via email to