Code Monkey home page Code Monkey logo

Comments (13)

johnno1962 avatar johnno1962 commented on June 12, 2024 1

Interesting, I wasn't aware -interposable carried such a cost. Your issues are never boring. Thanks again for filing it!

from hotreloading.

johnno1962 avatar johnno1962 commented on June 12, 2024

Hi, SwiftTrace "does things" but generally only if you ask it to by calling one of its apis. You see it as a framework as the Swift Package is a framework of necessity related to trampolines. I'd need to see the full state trace to tell you more.

from hotreloading.

johnno1962 avatar johnno1962 commented on June 12, 2024

Thinking about this come more it could be to do with processing large numbers of file events trying to determine the active project. You could try reducing the value for eventsToBackdate in FileWatcher.swift. Another alternative could be to switch to the new InjectionLite project which is a "no frills" reference implementation of the same functionality as the HotReloading project (though it still processes file events.)

from hotreloading.

qmkCamel avatar qmkCamel commented on June 12, 2024

Hi, SwiftTrace "does things" but generally only if you ask it to by calling one of its apis. You see it as a framework as the Swift Package is a framework of necessity related to trampolines. I'd need to see the full state trace to tell you more.
com_kwai_gif-2023-04-07-151823.ips.zip
Here is the ips file. Thanks

from hotreloading.

qmkCamel avatar qmkCamel commented on June 12, 2024

Thinking about this come more it could be to do with processing large numbers of file events trying to determine the active project. You could try reducing the value for eventsToBackdate in FileWatcher.swift. Another alternative could be to switch to the new InjectionLite project which is a "no frills" reference implementation of the same functionality as the HotReloading project (though it still processes file events.)

I will try it, thanks~

from hotreloading.

johnno1962 avatar johnno1962 commented on June 12, 2024

Ah, sorry, InjectionLite does not work on a device at all. Could it be a networking problem? I could put a pause in before it starts the injection thread.

from hotreloading.

qmkCamel avatar qmkCamel commented on June 12, 2024

May not be a networking problem, I have tested it.

from hotreloading.

qmkCamel avatar qmkCamel commented on June 12, 2024

If I only support OC injection on device, is it possible to without SwiftTrace?

from hotreloading.

johnno1962 avatar johnno1962 commented on June 12, 2024

Not without restructuring the code somewhat. SwiftTrace in itself really shouldn't be your problem though it will of course bind with the Swift runtime which may slow down the initial load of your Objective-C app. I'm afraid you may have to live with this; It only occurs on a very cold starts right? What model is your device?

from hotreloading.

qmkCamel avatar qmkCamel commented on June 12, 2024

Yes, only occurs on a very cold starts. I have tested several models of device, guess it may not the device model's problem.

from hotreloading.

johnno1962 avatar johnno1962 commented on June 12, 2024

There are a couple of other things you can try. Are you sure you don't see this problem without the HotReloading package? Another thing you could try is comparing your app with and without -Xlinker -interposable flag (which you don't need to inject an Objective-C app.)

from hotreloading.

qmkCamel avatar qmkCamel commented on June 12, 2024

Thanks, I will try it~

from hotreloading.

qmkCamel avatar qmkCamel commented on June 12, 2024

The cause of the problem is the interposable. Thanks.

from hotreloading.

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.