Announcement

Collapse
No announcement yet.

The ultimate quest for pak size optimization!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    The ultimate quest for pak size optimization!

    The size of the Android build is... unacceptable. There are some optimizations for reducing APK size and this is awesome, but the obb file is still huge.
    I know that there are options for shrinking it's size but come one... why do I have to dig around, selecting magic checkboxes when it should be out of the box!

    So, with this introductions - here are some improvements and suggestions:

    1. Don't include Engine/Content/Tutorial directory when SkipEditorContent enabled
    Yeah, so there is a nice checkbox that excludes from cooking any editor related content, which is nice, but it still adds the Editor Tutorial content. We don't need it.
    Also, maybe it is a good idea to have the SkipEditorContent enabled by default?
    Pull request: https://github.com/EpicGames/UnrealEngine/pull/3637
    REJECTED. There is a bug related to it UE-26327. They are on to it.

    2. Improve the PakBlackList functionality
    There is an option for ignoring cooked files to be packed into the pak file, but it would be nice to improve it:
    1. Make it hierarchical, like config files - Base in the Engine Build directories, then for Game Build directories for all build configurations, and then for Game Build directories for specific build configuration.
    2. It would be nice to have some base blacklist for files we know they shouldn't be inside.
    Pull request: https://github.com/EpicGames/UnrealEngine/pull/3638

    3. Engine directories to never cook list
    Just like the game directories to never cook but for the Engine. There are lot of files I do not use but they are put into the final build anyway.
    There should be a list that ignores specific files or directories when cooking.
    Pull request: https://github.com/EpicGames/UnrealEngine/pull/3639
    REJECTED. Epic stuff is concerned that this commit might break the stability.

    With this I could go from 122MB to 82MB. 26MB with compression enabled for Third Person Template project. So we're getting somewhere, but this is still hell of a content, which I'm not sure if it is necessary there.

    The main issue is that there is a content that is not openly referenced inside the project but it is cooked and packaged anyway. The best solution would be to find these references and get rid of them, but we've got 16th iteration of the Engine and the issue is still there from the very beginning. Because of this, it would be nice to have some power in deciding what goes to the build and what not.
    And I know that these mechanism are present for a long time, but they are not visible enaugh. In my opinion - most of them should be enabled by default!

    I suggest to make a list of content that is no desired for a packaged game:

    Engine/Content/VREditor/
    Engine/Content/Tutorial/
    Engine/Content/EditorLandscapeResources/
    Engine/Content/EditorSounds/
    Engine/Content/EditorMaterials/
    Engine/Content/EditorMeshes/
    Engine/Content/EditorResources/
    Engine/Content/Maps/
    Do You have any idea how to improve shrinking content size of pak? Some more mechanisms, tools, or blacklisted files?
    Last edited by zompi2; 06-08-2017, 03:45 AM.

    #2
    Thanks for suggestions and good luck with Pull Requests!
    Realtime Database Firebase | Ultimate Mobile Kit Firebase | Extended Facebook | Universal Mobile Ads | Google Analytics

    Comment


      #3
      <3 thanks for doing this!
      ZOMBIE TOWN AHHH (ANDROID/STEAM) | RIDE SHARE EMPIRE (ANDROID/GAME JAM) | NEVER NOT KNIGHT (ANDROID/GAME JAM) | TWITTER | MY UE4 TUTORIALS | ANSWERHUB

      Comment


        #4
        yesssss

        "Blacklist DefaultBloomKernel on mobile platforms (unneeded and takes 32MB)"

        https://github.com/EpicGames/UnrealE...767f0c301b155b
        ZOMBIE TOWN AHHH (ANDROID/STEAM) | RIDE SHARE EMPIRE (ANDROID/GAME JAM) | NEVER NOT KNIGHT (ANDROID/GAME JAM) | TWITTER | MY UE4 TUTORIALS | ANSWERHUB

        Comment


          #5
          Originally posted by BPANDREW View Post
          yesssss

          "Blacklist DefaultBloomKernel on mobile platforms (unneeded and takes 32MB)"

          https://github.com/EpicGames/UnrealE...767f0c301b155b
          Nice! Maybe whole editor stuff shouldn't go to mobiles by default too? What do you think?

          Comment


            #6
            well ideally i'd like it to be fully optimized, i get a ton of complaints about this, I've never inspected the apk & I don't know what we can live with out

            I'm just glad Epic is finally making a mobile game so they are dog-fooding UE4 Android and all this stuff will be resolved finally
            ZOMBIE TOWN AHHH (ANDROID/STEAM) | RIDE SHARE EMPIRE (ANDROID/GAME JAM) | NEVER NOT KNIGHT (ANDROID/GAME JAM) | TWITTER | MY UE4 TUTORIALS | ANSWERHUB

            Comment


              #7
              Still dont have experience to look deeper at how UE4 compiling for mobile, but feels that it compiles some extra non-necassary stuff
              so, thumb up for such thread!

              Comment


                #8
                Hi.
                Digging out an old topic of mine, but after some time (and after some awesome new features in 4.21) here's a recap of what I know what to do to optimize build size for Android:
                http://zompi.pl/reducing-build-size-...real-engine-4/

                I hope it will help
                Last edited by zompi2; 12-13-2018, 03:53 AM.

                Comment

                Working...
                X