Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about performance of Argu #90

Closed
matthid opened this issue Aug 26, 2017 · 4 comments
Closed

Question about performance of Argu #90

matthid opened this issue Aug 26, 2017 · 4 comments

Comments

@matthid
Copy link
Member

matthid commented Aug 26, 2017

Description

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

@eiriktsarpalis
Copy link
Member

eiriktsarpalis commented 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
Copy link
Member Author

matthid commented 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
Copy link
Member

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
Copy link
Member Author

matthid commented Mar 19, 2018

Some progress has been made in #109 and #105

@matthid matthid closed this as completed Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants