Coder Social home page Coder Social logo

求助怎么修复卡顿 about lottie-ios HOT 5 CLOSED

HaoRuizhi avatar HaoRuizhi commented on June 14, 2024
求助怎么修复卡顿

from lottie-ios.

Comments (5)

calda avatar calda commented on June 14, 2024

Please share a sample project that reproduces this error

from lottie-ios.

github-actions avatar github-actions commented on June 14, 2024

This issue is stale because it is marked "can't reproduce" and has had no activity in the past week. Please comment with additional information, or this issue will be closed due to inactivity in one week.

from lottie-ios.

supergithuber avatar supergithuber commented on June 14, 2024

Thread 0: 0 libsystem_kernel.dylib 0x1de0610f4 0x1de060000 + 4340 1 libdispatch.dylib 0x19e95af4c 0x19e956000 + 20300 2 CFNetwork 0x197a395cc 0x197a35000 + 17868 3 CFNetwork 0x197af988c 0x197a35000 + 805004 4 Foundation 0x19598b9a4 0x1958f8000 + 604580 5 AppName NSData.init(contentsOf:options:) (in AppName) 96 6 AppName FilepathImageProvider.imageForAsset(asset:) (in AppName) 312 7 AppName AnimationImageProvider.imageForAsset(asset:)AnimationImageProvider (in AppName) 20 8 AppName CachedImageProvider.imageForAsset(asset:) (in AppName) 132 9 AppName AnimationImageProvider.imageForAsset(asset:)AnimationImageProvider (in AppName) 20 10 AppName ImageLayer.setupImage(context:) (in AppName) 180 11 AppName LayerModel.makeAnimationLayer(context:) (in AppName) 516 12 AppName CALayer.setupLayerHierarchy(for:context:) (in AppName) 280 13 AppName PreCompLayer.setup(context:) (in AppName) 304 14 AppName LayerModel.makeAnimationLayer(context:) (in AppName) 296 15 AppName CALayer.setupLayerHierarchy(for:context:) (in AppName) 280 16 AppName CoreAnimationLayer.setupChildLayers() (in AppName) 252 17 AppName CoreAnimationLayer.init(animation:imageProvider:textProvider:fontProvider:compatibilityTrackerMode:logger:) (in AppName) 556 18 AppName LottieAnimationView.makeAutomaticEngineLayer(for:) (in AppName) 336 19 AppName LottieAnimationView.makeAnimationLayer(usingEngine:) (in AppName) 160 20 AppName _$s6Lottie0A13AnimationViewC9animation13imageProvider04textF004fontF013configuration6loggerAcA0aB0CSg_AA0b5ImageF0_pSgAA0b4TextF0_pAA0b4FontF0_pAA0A13ConfigurationVAA0A6LoggerCtcfcTf4nneennn_nAA07DefaultlF0C_AA0pmF0CTB5 (in AppName) 1004 21 AppName LottieAnimationView.__allocating_init(filePath:imageProvider:animationCache:configuration:) (in AppName) 944 以上是具体堆栈信息 卡顿点事NSData.init(contentsOf:options:) 调用是在主线程调用的,大家有遇到过这种问题不

same issue as you

from lottie-ios.

supergithuber avatar supergithuber commented on June 14, 2024

Please share a sample project that reproduces this error

to_keyboard.json

When loading the lottie's JSON above, it will block the main thread of app more than ten seconds.

sample code:
let view = LottieAnimationView(name: "to_keyboard")
view.play()

from lottie-ios.

calda avatar calda commented on June 14, 2024

I tested this locally and I see that the performance issue happens in a debug build, but not in a release build.

That suggests this is some sort of pathological performance issue in the Swift compiler (e.g. the compiler not generating properly optimized code in debug, or something) rather than a problem in Lottie itself.

If you have repro steps for this that show performances issues in a release build as well, feel free to re-open the issue.

from lottie-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.