question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App performance review

See original GitHub issue

Working on the issue 501, I had to understand how the app is propagating the TX list in order to show a new filed origin.

I found that src/routes/index.js renders this: const Safe = React.lazy(() => import('./safe/container'))<Route path={SAFE_ADDRESS} component={withTracker(Safe)} />

So far so good, then Safe, in componentDidMount using an interval: const TIMEOUT = process.env.NODE_ENV === 'test' ? 1500 : 5000 fetches an insane amount of that from the API and propagate it to the <Layout through props.

After that, Layout in the render, using react-router handles the content for each tab: image.png

Here we have 2 huge problems:

  1. No all tabs need all the data fetched in <Safe component.
  2. Sending all the props at <Layout level, produces a re-render of the whole app each TIMEOUT interval.

My proposal We can solve this problem pretty simple.

  1. Create a Redux store an entry in the redux store per each type of “data”, Tokens, Transactions, Currencies, AddressBook, etc.
  2. <Safe, instead of passing all the fetched data to <Layout as props, it updates the store from point 1.
  3. Then, each Tab subscribes to that store for the data it really needs, for example, Balance tab, will only subscribe to Tokens and not Transactions.

Refactor Needed The refactor should be really simple to implement, it’s just to move some props from Layout to the particular components and… subscribe these components to the redux store created at point 1.

Improvement

  • With this solution, the whole app won’t render each 1.5 seconds in dev or 5 seconds in production. Only the needed components will render.

  • Also, the development will be simplified because we won’t need to pay attention in side-effects produced by the constants re-renders.

  • spiritual peace

GOAL: Create multiple issues focusing each of them on a specific performance issue.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nicosamplercommented, Feb 19, 2020

I mean a key per entity in the current store

0reactions
Agupanecommented, Mar 6, 2020

I strongly agree with this proposal, Also I think it would be also useful some benchmarking as Mikhail suggested 😃 but I think that maybe we would need to get rid of immutable js in order to achieve that as already mentioned

Would be nice if we can do a small experiment with this to see what we can do and estimate it better

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Best Apps for 360-Degree Performance Evaluation - GetApp
5 Best Apps for 360-Degree Performance Evaluation · 1. 15Five: Celebrate your peers with one click · 2. PerformYard: Create a new reviews...
Read more >
Top 10 BEST Performance Review Software Of 2022 [Free ...
Reviewsnap is an online performance management platform with capabilities of performance reviews, 360-Degree feedback, performance notes, goal ...
Read more >
5 Apps to Prepare Yourself for Performance Reviews
5 Apps To Manage Reviews Well · 1) Lattice · 2) Trakstar Performance Appraisal · 3) Reviewsnap · 4) Performance Pro · 5)...
Read more >
Performance Management App: Reviews, Real Time ...
AssessTEAM performance management mobile app includes simple online employee reviews, real-time feedback ability, and 360-degree evaluations.
Read more >
Employee Performance Review Form Mobile App - GoCanvas
With the app, supervisors and managers can deliver instant feedback related to employee performance. The employee evaluation app covers all areas of job ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found