Thread
#multiplatform
    sendoav

    sendoav

    9 months ago
    Hi all! I have an umbrella framework containing 6 kotlin modules. Even the smallest change in one module provokes the linkPodDebugFrameworkIos64 to take more than 4 minutes, is it normal? I have already checked some tips to improve native compilation time but I'm not able to lower from 4 minutes. I'm using kotlin 1.5.30
    Karel Petránek

    Karel Petránek

    9 months ago
    Sadly this is pretty normal, we are on 10+ minutes on a relatively small project, any change seems to trigger re-linking and that always runs for a long time.
    sendoav

    sendoav

    9 months ago
    Have you tried to modularize the kotlin shared code?
    Karel Petránek

    Karel Petránek

    9 months ago
    Yes, it helps a bit but if you change a module that other modules depend on, it is pretty much the same total time
    Matti MK

    Matti MK

    9 months ago
    Jumping into the conversation a bit later: what do you recon is causing these long build times? Is it the modularisation or something else related to the build? I checked mine and after a small change to
    commonMain
    the build took 1s
    On GitHub action’s
    macos
    CI the build takes significantly longer, that’s about 15mins. However, there’s some small steps like
    xcodegen
    and
    pod install
    + buildtime scripts that affect it
    sendoav

    sendoav

    9 months ago
    The modularization helps reducing time. Some of the steps related to module compilation are are already cached if you dont modify a module. The most time consuming step is related to linking and creating the framework. In my case we have quite a big number of classes within each module
    Matti MK

    Matti MK

    9 months ago
    Yep, I was wondering if there’s something specific about KMM and modularisation. So, basically I guess that for you “the smallest change in one module” is actually a change to some form of a root module that has a number of other modules depending on it and as such those other modules need to be recompiled as well. I suppose the linking part is completely separate from the compilation of the modules, as in that you’ll always have to do the linking task which takes X time no matter the extent of the change?
    sendoav

    sendoav

    9 months ago
    Yeap, just for testing I have creating a very tiny module and just changed it, without affecting the rest of modules, but the linking task takes the same time, it is independent of the kind of change. It is related to the size of content you are converting to ios framework
    Matti MK

    Matti MK

    9 months ago
    How are you linking these modules to the iOS project? Are they all in one pod?
    sendoav

    sendoav

    9 months ago
    yes, it os one umbrella framework included in one single pod
    Matti MK

    Matti MK

    9 months ago
    I am wondering whether it could be possible to split them up into a number of different pods and that way have a bit more of a granular linking happening. However, you’d still have dependencies in-between the pods so…
    sendoav

    sendoav

    9 months ago
    Till now I think it is not possible, in order to include more than one kmm module as a framework they need to be independent