You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that Argu uses reflection and therefore is kind of slow. I just wanted to ask if there are other ways of achieving performance besides doing stuff like fsprojects/Paket@827c282
For paket restore I consider this way too slow for what I'm trying to achieve. Basically the above commit improved performance from around 3secs to about 700ms
Maybe we need a type-provider for argument parsing but we don't have type arguments yet
/cc @dsyme
It would probably make sense to profile performance characteristics of argu on a large CLI interface like paket. Paket does a great deal of reflection-based precomputation at initialization which may not be required in the scope of running a single command. I think startup time could be improved by making certain aspects of union case metadata extraction lazy. I followed this approach when implementing subcommands and could certainly be retrofitted to other aspects of reflection-based extraction.
So, because of the peculiar nature of this library, namely using reflection to parse a single string of arguments, I'm not entirely convinced that reflection might be the dominant factor in Argu performance. I wouldn't be too surprised if runtime loading of the library itself is what takes the longest time. Perhaps comparing 32bit vs. 64bit RyuJIT startup times might reveal something there.
Activity
eiriktsarpalis commentedon Aug 28, 2017
It would probably make sense to profile performance characteristics of argu on a large CLI interface like paket. Paket does a great deal of reflection-based precomputation at initialization which may not be required in the scope of running a single command. I think startup time could be improved by making certain aspects of union case metadata extraction lazy. I followed this approach when implementing subcommands and could certainly be retrofitted to other aspects of reflection-based extraction.
matthid commentedon Aug 28, 2017
Ok I might be able to take a look at this thanks for the hints. So you think it will be enough and we don't need a radically different approach?
eiriktsarpalis commentedon Aug 28, 2017
So, because of the peculiar nature of this library, namely using reflection to parse a single string of arguments, I'm not entirely convinced that reflection might be the dominant factor in Argu performance. I wouldn't be too surprised if runtime loading of the library itself is what takes the longest time. Perhaps comparing 32bit vs. 64bit RyuJIT startup times might reveal something there.
matthid commentedon Mar 19, 2018
Some progress has been made in #109 and #105