Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research on performance #53

Open
prastut opened this issue Jul 25, 2018 · 1 comment
Open

Research on performance #53

prastut opened this issue Jul 25, 2018 · 1 comment
Assignees

Comments

@prastut
Copy link
Owner

prastut commented Jul 25, 2018

Since we deal with live elements and the entire UX hinges around how fast we render elements when they happened, we need to deeply care about performance.

Some off the mind questions I want answers to:

  • What is paint time and how best do we reduce the time the browser paints the interface -> to reactivity? Need to read more into how gatsby.js came up: https://www.gatsbyjs.org/blog/2017-09-13-why-is-gatsby-so-fast/

  • Optimizing React components by optimizing componenentDidUpdate lifecycle. The more functional the components, the less they would update, the better we can optimize our codebase by returning false from the componentDidUpdate lifecycle.

This not a high priority issue but investigative work on how we would proceed will be really helpful.

The goal is there should be no jank on the website/app and the UX should be as buttery and smooth. Speed is one of the many things that lead to anxiety, confusion and irritation.

@prastut
Copy link
Owner Author

prastut commented Aug 6, 2018

Notes on optimizing components tying to the overall arc of optimizing performance:

  • <TwitterUser>

    • Should only render once and should not update itself.
    • Remove image exists logic -> should become stateless dumb component.
  • <TrendingEntities>

    • emoji prop should become a slot for Emoji component. Major bottleneck will get removed here.
    • Remove all slicing and sorting logic for trending entities-> should become stateless dumb component.
  • <TopicCard>:

    • Has to undergo massive refactor. Currently is tightly couped with <SentimentBar> and <Emoji> components. It should only care about displaying a Topic Card based on variant.
    • Most of the UI logic is repeated twice for the two variants. Ideally become unity.
  • <EventsTimeline>

    • swiper component has to be decoupled from the events timeline.
    • event should become a stateless dumb component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants