Skip to content

Question about performance of Argu  #90

Closed

Description

@matthid

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

Activity

  1. eiriktsarpalis commented on Aug 28, 2017

    @eiriktsarpalis
    Member

    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.

  2. matthid commented on Aug 28, 2017

    @matthid
    MemberAuthor

    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?

  3. eiriktsarpalis commented on Aug 28, 2017

    @eiriktsarpalis
    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.

  4. matthid commented on Mar 19, 2018

    @matthid
    MemberAuthor

    Some progress has been made in #109 and #105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions