jpd002 / Play-

Play! - PlayStation2 Emulator
http://purei.org
Other
2.03k stars 249 forks source link

Enabling JIT via TrollJitEnabler causes extreme lag #1331

Closed jonahdecker closed 1 month ago

jonahdecker commented 5 months ago

Quick summary

I have tried patching the Play!.ipa on versions 0.62 (stable) and 0.63-g9b7f7fca (nightly) with TrollJitEnabler and custom entitlements to be non-sandboxed. However, this causes extreme lag using both OpenGX and Vulkan in version 0.62 (0-4 fps), and 0.63-g9b7f7fca fails to get past "Scanning collection" loading screen.

System Details

Issue Details

The Play! process seems to be duplicating itself. I viewed my iPhone processes using CocoaTop, and Play! was listed at least 50 times and all the processes combined used well over 500% of my CPU. The process is /var/containers/Bundle/Application/A7B7F69D-C677-4224-9035-6B-D7F6B5DCEB/Play.app/Play.

When viewing the top process, the Resident Memory Usage is only 24 MB, while the Virtual Address Space Usage is over 389 GB.

Entitlements file used to patch:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.developer.kernel.extended-virtual-addressing</key>
    <true/>
    <key>com.apple.developer.kernel.increased-memory-limit</key>
    <true/>
    <key>com.apple.private.mobileinstall.upgrade-enabled</key>
    <true/>
    <key>com.apple.private.security.no-sandbox</key>
    <true/>
    <key>com.apple.private.security.storage.AppDataContainers</key>
    <true/>
    <key>com.apple.private.security.storage.MobileDocuments</key>
    <true/>
    <key>com.apple.security.exception.files.absolute-path.read-write</key>
    <array>
        <string>/private/var/mobile/Documents/Play!/</string>
    </array>
    <key>com.apple.security.iokit-user-client-class</key>
    <array>
        <string>IOSurfaceRootUserClient</string>
        <string>AGXDeviceUserClient</string>
        <string>AGXSharedUserClient</string>
        <string>AGXCommandQueue</string>
        <string>AGXDevice</string>
    </array>
    <key>get-task-allow</key>
    <true/>
    <key>platform-application</key>
    <true/>
</dict>
</plist> 

Screenshots/Videos.

Loading Screen CocoaTop Processes Play! Process Play! Process Details