Long action is locking renderer processVuex removes state id key value pair on mutationVuex: Skipping Action and committing Mutation directly from ComponentAccess Vuex state based on user actionVuex function execute before the otherVuex - …mapActions call from template: Cannot read property 'dispatch' of undefinedvuex actions that do not need to commit a mutationVuex Mutation running, but component not updating until manual commit in vue dev toolsHow to create default Vuex state with proper isLoading propertySetting firebase.User in vuex results in eternal loopCannot get Vuex mutation or action to pass data to state

Was adding milk to tea started to reduce employee tea break time?

wavelength of seismic wave with a gaussian source

What would be the ideal melee weapon made of "Phase Metal"?

How does one stock fund's charge of 1% more in operating expenses than another fund lower expected returns by 10%?

Should you avoid redundant information after dialogue?

Was the Ford Model T black because of the speed black paint dries?

Why would an Inquisitive rogue choose to use Insightful Fighting as opposed to using their Cunning Action to Hide?

How to convert 1k to 1000 and 1m to 1000000 in Excel

Filtering fine silt/mud from water (not necessarily bacteria etc.)

How can one write good dialogue in a story without sounding wooden?

How to make 1,1-diphenyl-1-butene from benzophenone and 1-bromopropane?

Grammy Winners Grading

Am I testing diodes properly?

TikZ Can I draw an arrow by specifying the initial point, direction, and length?

Why can't supermassive black holes merge? (or can they?)

What does "Fotze" really mean?

A "Simple" Task

If the derivative of a function is square of it then it is constant

Ambiguous sentences: How to tell when they need fixing?

Would letting a multiclass character rebuild their character to be single-classed be game-breaking?

How to repair a laptop's screen hinges?

Is it rude to tell recruiters I would only change jobs for a better salary?

Cops: The Hidden OEIS Substring

Are there any double stars that I can actually see orbit each other?



Long action is locking renderer process


Vuex removes state id key value pair on mutationVuex: Skipping Action and committing Mutation directly from ComponentAccess Vuex state based on user actionVuex function execute before the otherVuex - …mapActions call from template: Cannot read property 'dispatch' of undefinedvuex actions that do not need to commit a mutationVuex Mutation running, but component not updating until manual commit in vue dev toolsHow to create default Vuex state with proper isLoading propertySetting firebase.User in vuex results in eternal loopCannot get Vuex mutation or action to pass data to state






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a function that I'm calling in a component template. It reacts on changes in a vue-select component.



<v-select
v-model="model"
:options="eventList"
:placeholder="currentEventTitle"
v-on:input="selectedEvent"
taggable
label="name"
></v-select>

...

</template>
<script>

...

methods:
...mapActions(
selectedEvent: "selectedEvent"
)



This selectedEvent action that is being dispatched contains many HTTP calls, commits to the store, and calls to other actions. The issue is that once this has been called, the UI completely locks and doesn't update until about halfway through the function.



How should I call an action that will commit (mutate), and dispatch other actions, and not lock the UI?



Update



The problem has disappeared in our production build and only exists when we have development mode enabled.










share|improve this question



















  • 1





    I suggest thinking about webworkers - so you can push workload to an own "thread"

    – Estradiaz
    Mar 26 at 8:16











  • The thing is the API calls don't block the UI thread when calling them without vuex. It was only after committing the results to the vuex store, calling the APIs through a dispatch, that this became an issue.

    – John Snow
    Mar 26 at 18:00












  • Hmm then I guess it is due to big data coming from HTTP calls and reactivity. I had a case with 2k+ items and solved it by referencing only a subset of those in vue/vuex - storing the data in a global or component non reactivly.

    – Estradiaz
    Mar 26 at 21:03

















0















I have a function that I'm calling in a component template. It reacts on changes in a vue-select component.



<v-select
v-model="model"
:options="eventList"
:placeholder="currentEventTitle"
v-on:input="selectedEvent"
taggable
label="name"
></v-select>

...

</template>
<script>

...

methods:
...mapActions(
selectedEvent: "selectedEvent"
)



This selectedEvent action that is being dispatched contains many HTTP calls, commits to the store, and calls to other actions. The issue is that once this has been called, the UI completely locks and doesn't update until about halfway through the function.



How should I call an action that will commit (mutate), and dispatch other actions, and not lock the UI?



Update



The problem has disappeared in our production build and only exists when we have development mode enabled.










share|improve this question



















  • 1





    I suggest thinking about webworkers - so you can push workload to an own "thread"

    – Estradiaz
    Mar 26 at 8:16











  • The thing is the API calls don't block the UI thread when calling them without vuex. It was only after committing the results to the vuex store, calling the APIs through a dispatch, that this became an issue.

    – John Snow
    Mar 26 at 18:00












  • Hmm then I guess it is due to big data coming from HTTP calls and reactivity. I had a case with 2k+ items and solved it by referencing only a subset of those in vue/vuex - storing the data in a global or component non reactivly.

    – Estradiaz
    Mar 26 at 21:03













0












0








0








I have a function that I'm calling in a component template. It reacts on changes in a vue-select component.



<v-select
v-model="model"
:options="eventList"
:placeholder="currentEventTitle"
v-on:input="selectedEvent"
taggable
label="name"
></v-select>

...

</template>
<script>

...

methods:
...mapActions(
selectedEvent: "selectedEvent"
)



This selectedEvent action that is being dispatched contains many HTTP calls, commits to the store, and calls to other actions. The issue is that once this has been called, the UI completely locks and doesn't update until about halfway through the function.



How should I call an action that will commit (mutate), and dispatch other actions, and not lock the UI?



Update



The problem has disappeared in our production build and only exists when we have development mode enabled.










share|improve this question
















I have a function that I'm calling in a component template. It reacts on changes in a vue-select component.



<v-select
v-model="model"
:options="eventList"
:placeholder="currentEventTitle"
v-on:input="selectedEvent"
taggable
label="name"
></v-select>

...

</template>
<script>

...

methods:
...mapActions(
selectedEvent: "selectedEvent"
)



This selectedEvent action that is being dispatched contains many HTTP calls, commits to the store, and calls to other actions. The issue is that once this has been called, the UI completely locks and doesn't update until about halfway through the function.



How should I call an action that will commit (mutate), and dispatch other actions, and not lock the UI?



Update



The problem has disappeared in our production build and only exists when we have development mode enabled.







user-interface vue.js electron vuex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 16 at 3:55







John Snow

















asked Mar 26 at 5:21









John SnowJohn Snow

61512 silver badges27 bronze badges




61512 silver badges27 bronze badges







  • 1





    I suggest thinking about webworkers - so you can push workload to an own "thread"

    – Estradiaz
    Mar 26 at 8:16











  • The thing is the API calls don't block the UI thread when calling them without vuex. It was only after committing the results to the vuex store, calling the APIs through a dispatch, that this became an issue.

    – John Snow
    Mar 26 at 18:00












  • Hmm then I guess it is due to big data coming from HTTP calls and reactivity. I had a case with 2k+ items and solved it by referencing only a subset of those in vue/vuex - storing the data in a global or component non reactivly.

    – Estradiaz
    Mar 26 at 21:03












  • 1





    I suggest thinking about webworkers - so you can push workload to an own "thread"

    – Estradiaz
    Mar 26 at 8:16











  • The thing is the API calls don't block the UI thread when calling them without vuex. It was only after committing the results to the vuex store, calling the APIs through a dispatch, that this became an issue.

    – John Snow
    Mar 26 at 18:00












  • Hmm then I guess it is due to big data coming from HTTP calls and reactivity. I had a case with 2k+ items and solved it by referencing only a subset of those in vue/vuex - storing the data in a global or component non reactivly.

    – Estradiaz
    Mar 26 at 21:03







1




1





I suggest thinking about webworkers - so you can push workload to an own "thread"

– Estradiaz
Mar 26 at 8:16





I suggest thinking about webworkers - so you can push workload to an own "thread"

– Estradiaz
Mar 26 at 8:16













The thing is the API calls don't block the UI thread when calling them without vuex. It was only after committing the results to the vuex store, calling the APIs through a dispatch, that this became an issue.

– John Snow
Mar 26 at 18:00






The thing is the API calls don't block the UI thread when calling them without vuex. It was only after committing the results to the vuex store, calling the APIs through a dispatch, that this became an issue.

– John Snow
Mar 26 at 18:00














Hmm then I guess it is due to big data coming from HTTP calls and reactivity. I had a case with 2k+ items and solved it by referencing only a subset of those in vue/vuex - storing the data in a global or component non reactivly.

– Estradiaz
Mar 26 at 21:03





Hmm then I guess it is due to big data coming from HTTP calls and reactivity. I had a case with 2k+ items and solved it by referencing only a subset of those in vue/vuex - storing the data in a global or component non reactivly.

– Estradiaz
Mar 26 at 21:03












1 Answer
1






active

oldest

votes


















0














If vuex observer/ reactivity is the reason for the ui block one can simply freeze big objects to prevent reactivity:



actions = 

// ...,
assignBigData(context, data)
//...
// mutate data
const clone = ...data
context.commit('commiter', Object.freeze(clone))
,
selectedEvent: async function(context, ...args)

const response = await request()

context.dispatch('assignBigData', Object.freeze(response))







share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55350339%2flong-action-is-locking-renderer-process%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    If vuex observer/ reactivity is the reason for the ui block one can simply freeze big objects to prevent reactivity:



    actions = 

    // ...,
    assignBigData(context, data)
    //...
    // mutate data
    const clone = ...data
    context.commit('commiter', Object.freeze(clone))
    ,
    selectedEvent: async function(context, ...args)

    const response = await request()

    context.dispatch('assignBigData', Object.freeze(response))







    share|improve this answer



























      0














      If vuex observer/ reactivity is the reason for the ui block one can simply freeze big objects to prevent reactivity:



      actions = 

      // ...,
      assignBigData(context, data)
      //...
      // mutate data
      const clone = ...data
      context.commit('commiter', Object.freeze(clone))
      ,
      selectedEvent: async function(context, ...args)

      const response = await request()

      context.dispatch('assignBigData', Object.freeze(response))







      share|improve this answer

























        0












        0








        0







        If vuex observer/ reactivity is the reason for the ui block one can simply freeze big objects to prevent reactivity:



        actions = 

        // ...,
        assignBigData(context, data)
        //...
        // mutate data
        const clone = ...data
        context.commit('commiter', Object.freeze(clone))
        ,
        selectedEvent: async function(context, ...args)

        const response = await request()

        context.dispatch('assignBigData', Object.freeze(response))







        share|improve this answer













        If vuex observer/ reactivity is the reason for the ui block one can simply freeze big objects to prevent reactivity:



        actions = 

        // ...,
        assignBigData(context, data)
        //...
        // mutate data
        const clone = ...data
        context.commit('commiter', Object.freeze(clone))
        ,
        selectedEvent: async function(context, ...args)

        const response = await request()

        context.dispatch('assignBigData', Object.freeze(response))








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 26 at 21:26









        EstradiazEstradiaz

        7831 silver badge10 bronze badges




        7831 silver badge10 bronze badges


















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55350339%2flong-action-is-locking-renderer-process%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해