Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

128
Visualizações
Any way to speed up Redux store updates?

I've got some piece of functionality that I want to update very quickly. When I use local state, it updates pretty much immediately, the feedback is immediately visible to the user.

However I want to store this data so that the user can have this setting saved permanently (it also sends it to a database asynchronously via sagas, but that doesn't seem to be related to the slowdown)

The slowness seems to be related to saving it to my Redux store.

I am trying to figure out how to optimize it - I am currently using a relatively large Redux object (about 60 parameters) which may very well be the issue, even though I've read that increasing the size of an object stored in Redux shouldn't cause any issues.

My code to update the object looks like this:

export const settingsSave = (settings: object) => {
  return {
    type: Actions.SETTINGS_SAVE,
    payload: settings,
  };
};

And the data I am trying to update in it is just a standard boolean.

props.settingsSave({
    sentence_collapse: !props.settings.sentence_collapse,
 });

Is there any way to speed this operation up, besides breaking up the large object into smaller objects (which would be a headache, as it is stored all on the same data related to user settings in my backend).

I tried this:

const [collapse, setCollapse] = useState(props.settings.sentence_collapse);

And then tried to have the actual user interface element controlled by the local state, whilst updating global state in the background, but this seemed to lead to the same slowness.

Is there some sort of principle I am missing for React/Redux here for faster speed?

almost 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda