WeakAuras2 icon indicating copy to clipboard operation
WeakAuras2 copied to clipboard

reserve time for each action in login thread

Open emptyrivers opened this issue 1 year ago • 3 comments

the times selected are completely arbitrary. The primary reason for this is to make WA liable to defer Resume() until the next frame, if AddMany() takes a decent chunk of time (usually due to migrations).

A user who's really determined can still defeat this strategy by importing so many auras that Resume() itself takes > 19 seconds to execute, but there's very little we can do about that anyways.

Closes #5172 (not by fixing it, but by making it less likely)

emptyrivers avatar Jun 21 '24 05:06 emptyrivers

An experimental build of WeakAuras with the changes in this pull request is available here. Build Time: Sun Aug 25 15:38:21 UTC 2024

github-actions[bot] avatar Jun 21 '24 05:06 github-actions[bot]

I tested the experimental build and I keep getting the same error

1x WeakAuras/WeakAuras.lua:1301: script ran too long [string "@WeakAuras/WeakAuras.lua"]:1301: in function Login' [string "@WeakAuras/WeakAuras.lua"]:1389: in function <WeakAuras/WeakAuras.lua:1337>

Locals: initialTime = 15000 takeNewSnapshots = true loginThread = startTime = 240853857.499900 finishTime = 240864908.433600 ok = true val = nil timeForNextStep = 1000 (*temporary) = true (*temporary) = nil (*temporary) = true (*temporary) = true (*temporary) = nil (*temporary) = "script ran too long" Private = { HandleGlowAction = defined @WeakAuras/WeakAuras.lua:3619 frame_strata_types =
{ } DisplayToString = defined @WeakAuras/Transmission.lua:357 combat_event_type =
{ } regions =
{ } frameLevels =
{ } CheckItemSlotCooldowns = defined @WeakAuras/GenericTrigger.lua:3166 InitializeEncounterAndZoneLists = defined @WeakAuras/Types_Cata.lua:13 IsEnvironmentInitialized = defined @WeakAuras/AuraEnvironment.lua:200 form_types =
{ } CleanArchive = defined @WeakAuras/History.lua:25 UpdateProgressFrom = defined @WeakAuras/RegionTypes/RegionPrototype.lua:567 RunConditions = defined @WeakAuras/Conditions.lua:840 tooltip_count =
{ } SmoothStatusBarMixin =
{ } pet_spec_types =
{ } regionOptions =
{ } get_zoneId_list = defined @WeakAuras/Types_Cata.lua:75 checkForSingleLoadCondition = defined @WeakAuras/Prototypes.lua:1224 author_option_classes =
{ } grid_types =
{ } non_transmissable_fields =
{ } absorb_modes =
{ } combatlog_spell_school_types_for_ui =
{ } miss_types =
{ } CancelDelayedTrigger = defined @WeakAuras/GenericTrigger.lua:944 centered_types_h =
{ } ensurePRDFrame = defined @WeakAuras/WeakAuras.lua:5437 talent_types =
{ } LoadFunction = defined @WeakAuras/AuraEnvironment.lua:652 reset_swing_spells =
{ } spec_types_all =
{ } player_target_events =
{ } FinishLoadUnload = defined @WeakAuras/WeakAuras.lua:2067 subRegionTypes =
{ } UnregisterAllEveryFrameUpdate = defined @WeakAuras/GenericTrigger.lua:1884 array_entry_name_types =
{ } eclipse_direction_types =
{ } StringToTable = defined @WeakAuras/Transmission.lua:301 RegisterLoadEvents = defined @WeakAuras/WeakAuras.lua:1913 GetReputationsSorted = defined @WeakAuras/Types.lua:1712 blend_types =
{ } text_automatic_width =
{ } EnforceSubregionExists = defined @WeakAuras/RegionTypes/RegionPrototype.lua:1125 CheckSpellCooldown = defined @WeakAuras/GenericTrigger.lua:3022 custom_trigger_types =
{ } group_types =
{ } subRegionOptions =
{ } GetProgressValueConstant = defined @WeakAuras/WeakAuras.lua:3930 text_rotate_types =
{ } spec_types =
{ } anim_ease_types =
{ } item_slot_types =
{ } multiUnitUnits =
{ } anim_color_types =
{ } loaded =
{ } Convert = defined @WeakAuras/WeakAuras.lua:2284 sound_channel_types =
{ } CheckCooldownReady = defined @WeakAuras/GenericTrigger.lua:3224 event_prototypes =
{ } NeedToRepairDatabase = defined @WeakAuras/WeakAuras.lua:2361 AtlasList =
{ } RegisterRegionType = defined @WeakAuras/WeakAuras.lua:413 classification_types =
{ } GetCurrencyListSize = defined =[C]:-1 unit_types_bufftrigger_2 =
{ } IsOptionsProcessingPaused = defined @WeakAuras/WeakAuras.lua:1589 ValueFromPath = defined `

Desik avatar Jun 21 '24 19:06 Desik

I tested the last artifact and got an error again

1x WeakAuras/WeakAuras.lua:4377: script ran too long [string "@WeakAuras/WeakAuras.lua"]:4377: in function <WeakAuras/WeakAuras.lua:4363> [string "@WeakAuras/WeakAuras.lua"]:4397: in function Immediate' [string "@WeakAuras/WeakAuras.lua"]:1296: in function `Login' [string "@WeakAuras/WeakAuras.lua"]:1370: in function <WeakAuras/WeakAuras.lua:1318>

Locals: pool =

{ login = } finish = 276505524.720800 defaultEstimate = 1000 start = 276490524.721600 estimates =
{ login = 5 } ok = true val = 5 continue = true (for generator) = defined =[C]:-1 (for state) =
{ login = } (for control) = "login" name = "login" thread = estimate = 5 (*temporary) = true (*temporary) = 5 (*temporary) = true (*temporary) = 5 (*temporary) = true (*temporary) = "script ran too long" debugprofilestop = defined =[C]:-1 debugstack = defined =[C]:-1 threads =
{ normal =
{ } SetPriority = defined @WeakAuras/WeakAuras.lua:4338 instant =
{ } urgent =
{ } Remove = defined @WeakAuras/WeakAuras.lua:4348 Immediate = defined @WeakAuras/WeakAuras.lua:4395 Add = defined @WeakAuras/WeakAuras.lua:4324 background =
{ } frame = Frame { } prios =
{ } size = 1 }`

Desik avatar Jun 22 '24 06:06 Desik