FFXIVClientStructs
FFXIVClientStructs copied to clipboard
Dalamud Loading is too slow. Trying optimize it.
-
Problem Dalamud loading is way too slow. The game window is frozen for more than 3s. If active Dalamud during game play, charactor even change into offline notification.
-
Analys using dotnet trace to get the cpu time chart. found out the
ffxivclientstructs!FFXIVClientStructs.Resolver.Initialize()
method using 3.05s in main thread. After reading all the code, thinking maybe the sigscan method is too simple and not focus on perfomance. -
Resolve Replaced original sigscan method with Reloaded.Memory.SigScan.
-
Result the loading time is shortened about 0.8s. Not very effective.
maybe try lazy sig loading? We'd need a mechanism to run all sigs on patch days to check if any have broken though.
lazy loading was part of my plan for the generator revamp but at this point I don't know when that will happen. could probably do it temporarily on the current generator though.
My next target is to load all the Structs sig in another thread, avoiding stuck the game thread.
aers @.***>于2022年3月13日 周日上午7:00写道:
lazy loading was part of my plan for the generator revamp but at this point I don't know when that will happen. could probably do it temporarily on the current generator though.
— Reply to this email directly, view it on GitHub https://github.com/aers/FFXIVClientStructs/pull/168#issuecomment-1065980327, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARBPGXUGD7NQ5FFDHPRPYDU7UOXJANCNFSM5QPYF6UQ . You are receiving this because you authored the thread.Message ID: @.***>
--
BX
if a plugin needs that sig immediately afterwards, its going to be bad. I'd lean towards sigs on demand. just modify the generator to use backer fields and lazy getters.
On Sat, Mar 12, 2022 at 9:24 PM Bob Xiang @.***> wrote:
My next target is to load all the Structs sig in another thread, avoiding stuck the game thread.
aers @.***>于2022年3月13日 周日上午7:00写道:
lazy loading was part of my plan for the generator revamp but at this point I don't know when that will happen. could probably do it temporarily on the current generator though.
— Reply to this email directly, view it on GitHub < https://github.com/aers/FFXIVClientStructs/pull/168#issuecomment-1065980327 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AARBPGXUGD7NQ5FFDHPRPYDU7UOXJANCNFSM5QPYF6UQ
. You are receiving this because you authored the thread.Message ID: @.***>
--
BX
— Reply to this email directly, view it on GitHub https://github.com/aers/FFXIVClientStructs/pull/168#issuecomment-1066008039, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMTBCA5KHCW7AKYODM6PLU7VGW5ANCNFSM5QPYF6UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
it's the dalamud's problem to order the loading async ly.
Dalamud has no idea if a sig inside this is ready or not. Nor the introspection into the plugins for usage.
On Tue, Mar 15, 2022, 12:57 PM rlynch-ironnet @.***> wrote:
Dalamud has no idea if a sig inside client structs is ready or not.
— Reply to this email directly, view it on GitHub https://github.com/aers/FFXIVClientStructs/pull/168#issuecomment-1068224121, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMTBHQ4PBCGLX66O7BCELVAC6OXANCNFSM5QPYF6UQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
The new resolver is much faster, this can likely be closed