Thread
#compose
    kioba

    kioba

    3 years ago
    I just listened to the benchmark episode on the backstage podcast and there was a brief mention of compose and the benchmark lib. Can you tell us a little about these tests? Also about that insight you learned?
    l

    Leland Richardson [G]

    3 years ago
    We are using the benchmark lib to understand where we should invest effort improving performance in a lot of different areas. It has been tremendously helpful so far, and has led to various improvements and also some design decisions we still are working on implementing right now
    it informed some changes we made in layout. i’m not sure if the specific things are that interesting to talk about (and i’m not really close enough to that part to speak on it tbh)
    also the compose runtime itself
    we’ve made some changes to how “recompose scopes” get used since we ended up seeing a lot of waste and overhead there. it’s also helped us remove a slow-path in composition “groups” that we didn’t know we were hitting but we were
    and also caused us to prioritize some optimizations around removing groups where they weren’t needed since they were causing more overhead than we initially thought they would
    there’s lots more but a lot of it is stuff we are still sort of analyzing or figuring out how we should optimize
    but it’s been useful to have those tests to let us know when we regress and also what our baseline is
    m

    mzgreen

    3 years ago
    I guess we’ll eventually get those phones with 120hz displays so great to hear that Compose will be fast 👏
    Luca Nicoletti

    Luca Nicoletti

    3 years ago
    @Leland Richardson [G] Can you tell us a little more about how you’ve been using the benchmark lib to test Compose?
    r

    romainguy

    3 years ago
    You should be able to see all the benchmarks we use in the source tree.
    l

    Leland Richardson [G]

    3 years ago
    yeah i think your best bet is to just check out the source. i’m not sure what you’re expecting but it’s not that interesting. we are just using the lib to do perf measurements across different parts of the system, depending on what we are interested in
    kioba

    kioba

    3 years ago
    haha 😅
    "do perf measurements across different parts of the system"
    that is actually interesting for us. Especially knowing about the small details of performance investment and tricks you do. Thanks for the information btw @Leland Richardson [G] ! It is a good introduction to the topic and will check out the source. 🙂
    l

    Leland Richardson [G]

    3 years ago
    fwiw, there’s still a lot of perf optimizations that we think we want to do that we haven’t done yet. It’s good to start measuring though so that we know how impactful these optimizations are, as well as whether or not it is worth optimizing something based on how much time it is taking currently relative to other things (ie, is it the bottleneck?). Once we get into a better place I think it could be an interesting post or something to cover a lot of the decisions we made relating to perf and what results we saw from it.
    also if you’re interested in perf and haven’t seen my talk from chain react conference, it might be pretty interesting to you.