<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Luciano Holanda Gomes on Medium]]></title>
        <description><![CDATA[Stories by Luciano Holanda Gomes on Medium]]></description>
        <link>https://medium.com/@lucianohgo?source=rss-96aa0b6597b2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RmcwjbxRm44u_atfKeFKHQ.png</url>
            <title>Stories by Luciano Holanda Gomes on Medium</title>
            <link>https://medium.com/@lucianohgo?source=rss-96aa0b6597b2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 07:06:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lucianohgo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stop Informing, Start Collaborating — Lu’s Newsletter — Issue #13]]></title>
            <link>https://lucianohgo.medium.com/stop-informing-start-collaborating-lus-newsletter-issue-13-2b39b3e83e18?source=rss-96aa0b6597b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b39b3e83e18</guid>
            <category><![CDATA[meetings]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[process]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Luciano Holanda Gomes]]></dc:creator>
            <pubDate>Mon, 10 May 2021 17:23:15 GMT</pubDate>
            <atom:updated>2021-05-10T17:23:15.346Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stop Informing, Start Collaborating — Lu’s Newsletter — Issue #13</h3><p><em>Meetings are where I spend a lot of my time, they’re also one of the things that burn more cash and fatigue people in companies. Yet we repeat habits we know are destructive. This issue is dedicated to exploring ways we can make them better. As always, thanks a lot to everyone who shared the previous issues </em>🤗. <em>If you’re feeling generous (and a little smarter) by the end of this, share it on Twitter and LinkedIn, and let’s help more people stop burning cash and, worse, time in meetings!<br></em><a href="https://www.getrevue.co/profile/lucianohgo/issues/stop-informing-start-collaborating-lu-s-newsletter-issue-13-592867"><em>Originally Posted on Revue</em></a></p><h3>Stop Informing, Start Collaborating</h3><p>Email → Slack → Notion → Code → Twitter → LinkedIn → Back to Google Meet/Zoom room Email → Slack → Notion → Code → Twitter → LinkedIn. That’s what people are doing while we’re presenting our well-thought-out and beautiful presentation on that new Framework, Project, or Update we have. These meetings were hard enough in person. Now that people can tune us out, we should think about them quite literally as burning the company’s cash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*H2sDc2QDCQmf_gkn" /><figcaption>It’s way harder to catch someone’s attention when we’re competing with thousand different things they can do on their computer–Photo by Jonas Leupe on Unsplash</figcaption></figure><p>Remote work is not going anywhere. <a href="https://www.gartner.com/en/newsroom/press-releases/2020-07-14-gartner-survey-reveals-82-percent-of-company-leaders-plan-to-allow-employees-to-work-remotely-some-of-the-time">Gartner Research</a> has found that 82% of company leaders will allow people to work some of the time remotely. Yet, we’re still relying on some of the practices that do not work remotely. <a href="https://www.techrepublic.com/article/zoom-fatigue-by-the-numbers-a-new-poll-looks-at-video-conferencing-engagement/">Meeting fatigue</a> has increased with all the video calls we’re jam-packing in a single day. People are tired, unengaged, and angry at meetings even more than they were before. And they’re right.</p><p>You might get the urge right now to assign blame and finger-point. “<em>If they cared about the message, they would be paying attention.”</em> Or something like that might go through your head. <a href="https://lucianohgo.com/posts/stop-pointing-fingers">I urge you not to</a>. It’s upon us to lead the company to find what’s more effective and find ways to convey information and collaborate that work better remotely.</p><p>So what’s the fix? There’s still information we need to convey to multiple people. We still need alignment and commitment. I’ve found that some things help:</p><ol><li><strong>Avoid informational meetings, focus on outcomes</strong></li><li><strong>Enable discussion and collaboration</strong></li><li><strong>Prepare</strong></li></ol><p><strong>Read More:</strong></p><p><a href="https://lucianohgo.com/posts/stop-informing-start-collaborating?utm_campaign=Lu%27s%20Newsletter&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Stop Informing, Start Collaborating</a></p><h3>Snippets</h3><ul><li><a href="https://www.inc.com/magazine/202102/keith-ferrazzi/collaborative-problem-solving-decision-making-leadership.html">How to Use Collaborative Problem-Solving to Get to the Right Answers--Quickly</a></li><li><a href="https://www.forbes.com/sites/annlatham/2017/06/20/terrible-horrible-informational-meetings-and-why-you-should-stop-them/">Terrible, Horrible Informational Meetings, And Why You Should Stop Them</a></li></ul><p><a href="https://www.themodernmanager.com/episodes/episode/385fe4b1/146-preparing-for-a-productive-meeting?utm_campaign=Lu%27s%20Newsletter&amp;utm_medium=email&amp;utm_source=Revue%20newsletter"><strong>Preparing For A Productive Meeting | Episodes | The Modern Manager</strong></a><strong> — </strong><a href="https://www.themodernmanager.com/episodes/episode/385fe4b1/146-preparing-for-a-productive-meeting"><strong>www.themodernmanager.com</strong></a></p><p>In this episode, Mamie walks through what to do before a meeting to prepare yourself and your colleagues for a productive conversation.</p><h3>Tweets</h3><h3>John Cutler on Twitter: &quot;How much does your product rely on Motivation, Habits, and Environment vs. Knowledge and Skills?This will be a big factor in onboarding, education, product design, etc. Some visual notes from @usablelearning&#39;s book Design to Learn ... mixed with some tips from @Dave_Ferguson pic.twitter.com/8EVhdVBgZn / Twitter&quot;</h3><p>How much does your product rely on Motivation, Habits, and Environment vs. Knowledge and Skills?This will be a big factor in onboarding, education, product design, etc. Some visual notes from @usablelearning&#39;s book Design to Learn ... mixed with some tips from @Dave_Ferguson pic.twitter.com/8EVhdVBgZn</p><h3>Shreyas Doshi on Twitter: &quot;Tiny, but powerful vocabulary tweak:In product discussions, use the word &quot;instinct&quot; more&quot;what do you think about XYZ?&quot; → &quot;what&#39;s your instinct on XYZ?&quot;Benefits:Encourages use of instinctThe word &quot;instinct&quot; makes us less attached to our ideas than &quot;thoughts&quot;, &quot;opinion&quot; etc / Twitter&quot;</h3><p>Tiny, but powerful vocabulary tweak:In product discussions, use the word &quot;instinct&quot; more&quot;what do you think about XYZ?&quot; → &quot;what&#39;s your instinct on XYZ?&quot;Benefits:Encourages use of instinctThe word &quot;instinct&quot; makes us less attached to our ideas than &quot;thoughts&quot;, &quot;opinion&quot; etc</p><h3>Martin (马丁) Hynie on Twitter: &quot;Me: You tried to book me at lunch... my calendar shows that I am busy then.PM: Oh, I looked and saw that it said &quot;lunch&quot; and thought that meant you were free.Me: It is my lunch.PM: So you are free.Me: No. I am at lunch.PM: Are you meeting someone?Me: You&#39;re bad at this. / Twitter&quot;</h3><p>Me: You tried to book me at lunch... my calendar shows that I am busy then.PM: Oh, I looked and saw that it said &quot;lunch&quot; and thought that meant you were free.Me: It is my lunch.PM: So you are free.Me: No. I am at lunch.PM: Are you meeting someone?Me: You&#39;re bad at this.</p><h3>Thanks for reaching this far 🤗</h3><p>If you have any feedbacks &amp;/or ideas for the next issues <a href="/service/mailto:luciano.hg4@gmail.co?subject=Lu%27s%20Newsletter%20Feedback%20%26%2For%20Ideas&amp;utm_campaign=Lu%27s%20Newsletter&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">please send it to me</a> and I’ll make sure to read and act on it.</p><p>If you liked this content, share it with others who might like it too, and thanks a lot for reading it :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b39b3e83e18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s Software Quality, after all? — Lu’s Newsletter — Issue #12]]></title>
            <link>https://lucianohgo.medium.com/whats-software-quality-after-all-lu-s-newsletter-issue-12-4429fb04ce86?source=rss-96aa0b6597b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/4429fb04ce86</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[newsletter]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Luciano Holanda Gomes]]></dc:creator>
            <pubDate>Mon, 03 May 2021 11:32:01 GMT</pubDate>
            <atom:updated>2021-05-03T11:32:01.254Z</atom:updated>
            <content:encoded><![CDATA[<h3>What’s Software Quality, after all? — Lu’s Newsletter — Issue #12</h3><p><em>We talk a lot about quality, we rarely stop to explain what we mean. Quality is intrinsically connected with agility, so building effective, agile teams comes from being able to build quality incrementally. Knowing how to measure it is an important step in that way. So this issue dedicated to that subject. Share it with others to help build a shared understanding :) </em><a href="https://www.getrevue.co/profile/lucianohgo/issues/what-s-software-quality-after-all-lu-s-newsletter-issue-12-580149"><em>originally posted @Revue</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*1yc03km0lGo6T3PT" /><figcaption>Your users when you forget about quality — Photo by JESHOOTS.COM on Unsplash</figcaption></figure><h3>What’s Software Quality, after all?</h3><p>Quality is one of those terms thrown around that people assume we get what it is. Different people see different details of quality and talk as if it was the same thing. That’s a significant part of why engineers fail to get time to work on architecture, product managers fail to understand why things are taking so long, and Quality Analysts fail to assess quality. We all want to build great products but have a different view of what great means. So let’s try to create a shared understanding, but first, let’s see what’s wrong with how each group usually talks about quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*jspnpZHpSvJLVrwC" /></figure><h4>The Problem with how Product Managers and Designers talk about quality</h4><p>Product Managers and Designers care a lot about the User Experience., about the User’s Journey making sense, doing what it promises, and being delightful. They care about learning what matters most to the users, and being able to ship features fast is a great way to do that. This is what they’re looking for when they talk about quality. It makes a lot of sense; what’s the Problem with that?</p><p>Read More:</p><p><a href="https://lucianohgo.com/posts/what-is-quality-after-all?utm_campaign=Lu%27s%20Newsletter&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">What&#39;s Software Quality, after all?</a></p><h3>Snippets</h3><p>The <a href="https://iso25000.com/index.php/en/iso-25000-standards/iso-25010">ISO 25010 Quality Tree Model</a> is my favorite way to describe software quality, but it’s not the only one. In the <a href="https://www.thoughtworks.com/books/fundamentals-of-software-architecture">Fundamentals of Architecture Book</a> the authors also describe the concept of Architecture Characteristics or Ilities. Check them out in these reading notes:</p><p><a href="https://github.com/zhangjunhd/reading-notes/blob/master/software/FundamentalsOfSoftwareArchitecture.md?utm_campaign=Lu%27s%20Newsletter&amp;utm_medium=email&amp;utm_source=Revue%20newsletter#structural-architecture-characteristics">zhangjunhd/reading-notes</a></p><p>Other people defend simpler, shorter models that are tailored already to what matters most to the business:</p><p><a href="https://kislayverma.com/software-architecture/sidestep-architectural-ilities-and-deliver-business-value/?utm_campaign=Lu%27s%20Newsletter&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Sidestep architectural &quot;-ilities&quot; and deliver business value | Kislay Verma</a></p><p>At QuintoAndar, we have created our own set of architectural characteristics that we evaluate. At the end of the day, you have to focus on what matters most for your users. The following article presents the idea.</p><p><a href="https://medium.com/quintoandar-tech-blog/software-architecture-analysis-25bd0274d837">Software Architecture Analysis</a></p><h3>Thanks for reaching this far 🤗</h3><p>If you have any feedbacks &amp;/or ideas for the next issues <a href="/service/mailto:luciano.hg4@gmail.co?subject=Lu%27s%20Newsletter%20Feedback%20%26%2For%20Ideas&amp;utm_campaign=Lu%27s%20Newsletter&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">please send it to me</a> and I’ll make sure to read and act on it.</p><p>If you liked this content, share it with others who might like it too, and thanks a lot for reading it :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4429fb04ce86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Road to Great Product Performance: The First Steps]]></title>
            <link>https://lucianohgo.medium.com/the-road-to-great-product-performance-the-first-steps-d038ca238d24?source=rss-96aa0b6597b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d038ca238d24</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Luciano Holanda Gomes]]></dc:creator>
            <pubDate>Fri, 15 May 2020 11:46:49 GMT</pubDate>
            <atom:updated>2020-05-15T13:25:28.571Z</atom:updated>
            <content:encoded><![CDATA[<p>When we’re building our product, we’re passionate about enabling users to do more, empowering them. This passion leads to the creation of more and more ways the users can use our products to better accomplish their goals. Working like this rarely leaves us the time to tune and optimize, and it’s common to accumulate a lot of performance technical debt. <strong>At some point, we realize as a company that </strong><a href="https://lucianohgo.com/posts/avoid-losing-users-and-conversions"><strong>neglecting performance is directly affecting our business results</strong></a>. When that day comes, what should we do?</p><figure><img alt="A long highway road with trees on the side" src="https://cdn-images-1.medium.com/max/1024/1*-O4UOH-sqAEhbbn84c0ZZg.jpeg" /><figcaption>The road to a performant product is long, the sooner you start, the better — Photo by <a href="https://unsplash.com/@foxxmd?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Matt Duncan</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Note: In <a href="https://quintoandar.com.br/">QuintoAndar</a>, we’re still walking the path towards an excellent product performance. Furthermore, not all of these steps were the first steps that we took, but instead, they’re assembled based on what we believe, given our current experience, would’ve been the best first steps to take, after all:</p><blockquote>“Life can only be understood backwards, but it must be lived forward.”</blockquote><blockquote>— <a href="https://en.wikipedia.org/wiki/S%C3%B8ren_Kierkegaard">Søren Kierkegaard</a></blockquote><p>The way we structured this post aims at better explaining why each of the steps is important and what it accomplishes:</p><ul><li>Challenges with tackling Performance</li><li>The Steps</li><li>Step One: Set up a Group</li><li>Step Two: Measure and Lock</li><li>Step Three: Make performance something that the Company values</li><li>Conclusion</li></ul><p>Also, while we’re focused on starting to pay performance technical debt, all these steps can be implemented from day one and help you shape a better product from the get-go.</p><h3>Challenges with tackling Performance</h3><p>There have never been so many excellent resources on how to optimize your product available to the general public. Yet it’s still rare to see companies that get to spend time working on this. We understand much of what causes our applications to be slow, but we never get around to prioritize fixing it.</p><p>When developing features, the focus is usually on enabling users to do more, empowering them. We have a limited amount of time, so we typically focus on things we can measure and test. We want <strong>quantifiable and possible to validate hypotheses</strong>. So we gear our backlog towards working with features that can validate assumptions like “If we recommend users products that are similar to the ones he is currently showing interest in, we will be able to increase our conversion by X%”.</p><blockquote>We have a limited amount of time, so we typically focus on things we can measure and test. We want <strong>quantifiable and possible to validate hypotheses</strong>.</blockquote><p>What this means to technical debt is that in the trade-off battle of productivity x quality, <strong>if we can’t prove just how much following a quality standard will be positive, productivity will be prioritized</strong>. When this happens, more commonly, we are failing at defending our point of view other times we’re wrong about following that quality standard at that time. That’s why much of what we’re gonna talk about here is focused on providing you with those arguments, qualitative and quantitative and.</p><figure><img alt="Graph with two descending lines for Bounce Rate and Average Load time x Week. The lines show a trend of correlation." src="https://cdn-images-1.medium.com/max/1024/1*i5WHF8MN42FEICwYhnXquQ.jpeg" /><figcaption>Our bounce rate vs the Average Load time. In these 12 weeks, we lowered our average load time by <strong>33.3%</strong> and bounce rate by <strong>32.65%</strong>. We have the arguments, but we need to gather them!</figcaption></figure><p>Performance improvements often begin as the work of one or few people in the company and are usually not organized, not focused on quantifying, but rather an effort to learn and improve the UX of the product at the same time.</p><p>As this effort goes on, so many challenges start to pile on:</p><ul><li>A lot more people are adding features than optimizing;</li><li>Knowledge isn’t passed on how and why optimizations were done, and people don’t even grasp why it is needed;</li><li>Doing things the optimized way is harder than the un-optimized way, so examples of un-optimized code start to pile on;</li><li>New performance techniques emerge, like the recent implementation of picture and people begin using them before understanding the underlying application;</li><li><a href="https://www.smashingmagazine.com/2015/09/why-performance-matters-the-perception-of-time/">Small optimizations don’t bring in so much value</a> and with limited time to dedicate and working against a lot of new code, small optimizations end up being all people can focus on.</li></ul><p>If performance isn’t widely accepted as a core value of the product, it will soon be neglected as doing things the right way imposes more effort, and <a href="https://en.wikipedia.org/wiki/Principle_of_least_effort">we humans tend to naturally choose the path of least resistance</a>. Our main job, if we ever want a sustainable performance culture, needs to be focused on 1. Lowering this resistance and 2. Showing purpose and opportunity of working on this.</p><h3>The Steps</h3><p>Given the set of challenges we faced, I’ve assembled 3 steps that should help when starting to work on performance:</p><ul><li><strong>Set up a group</strong>: Gather individuals that are interested in the subject and give them support and incentive to keep the discussion alive, create, evolve and maintain the tools;</li><li><strong>Measure and Lock</strong>: Use real user metrics and lab metrics to prevent degradation, to understand how performance affects your business, and to pass knowledge forward;</li><li><strong>Make performance a part of what the Company values</strong>: Share learnings, the potential in results, and what was already achieved to engage the Product Management, Design, and Business areas of the company. Build tools to lower the barriers and incentivize the Engineering team.</li></ul><p>There are a lot of other things we did and each of these points merits a post of its own, but I’ll focus here on explaining the goals and general idea behind them. <a href="https://twitter.com/hg_Luciano">Let me know</a> if you’d like to a more in-depth explanation of the tools we used and built to address each of these steps!</p><h3>Step One: Set up a Group</h3><blockquote>Gather individuals that are interested in the subject and give them support and incentive to keep the discussion alive, create, evolve and maintain the tools;</blockquote><p>In <a href="https://quintoandar.com.br/">QuintoAndar</a>, we’re very keen on providing more autonomy and responsibility. The way this plays out is that we have many mission-oriented teams. We organize ourselves primarily based on <a href="https://blog.crisp.se/wp-content/uploads/2012/11/SpotifyScaling.pdf">Spotify’s team structure</a> and it has worked wonders for us. Our Squads become experts in a domain and part of the product and can significantly further the efforts on these fronts. Because of this, we’ve been able to move very fast to solve our primary users’ concerns.</p><figure><img alt="Drawing of the spotify agile organization. Shows squads, chapters, tribes and guilds different groups that can be assembled" src="https://cdn-images-1.medium.com/max/641/1*VJjl0oOqJC1dYbMVOr-isA.jpeg" /><figcaption><strong>The Spotify Model</strong>: Tribes, Squads, Chapters &amp; Guilds</figcaption></figure><p>There is a downside to everything, and the potential downside to full autonomy is a loss of economies of scale. An engineer in squad A may be wrestling with a performance issue that the engineers in squad B solved last week. That’s why, when it comes to subjects that are deep and core to a product’s experience, we highly recommend having a focused group that will, at the very least, discuss how to evolve that topic within the company.</p><p>In our structure, we roughly had three options:</p><ol><li><strong>Performance Chapter</strong>: The chapter is a small family of people having similar skills and working within the same general competency area. It is great for knowledge sharing and to evolve tools and practices within the company, but it’s harder to implement and organize since it involves adding to the core competencies shared in the company;</li><li><strong>Performance Guild</strong>: A Guild is a more organic and wide-reaching “community of interest”, a group of people that want to share knowledge, tools, code, and practices. It’s great for discussion and knowledge sharing, but we’ve found that it doesn’t perform well as a well to maintain governance over tools to move big projects forward;</li><li><strong>Performance functional team</strong>: Assembling a small set of people who have prior knowledge and interest in deepening that knowledge and having them do most of the groundwork in creating and maintaining the tools that will be used company-wide. It’s also usually a good idea to have them battle test these tools by doing essential optimizations in the product.</li></ol><blockquote>Note that <strong>not one of these treats performance as a job of the group alone, but instead rely on leveraging the company structure to improve the product’s performance and just makes this process easier</strong> by providing the set of practices and tools needed.</blockquote><p>All of these are great and an excellent first step towards bringing the topic to life in your company, but each organization has its particularities. Consider what works best for you, start with the more natural group structure and move fast to the ideal.</p><h3>Step Two: Measure and Lock</h3><blockquote>Use real user metrics and lab metrics to prevent degradation, to understand how performance affects your business, and to pass knowledge forward</blockquote><p>The main goals are three-fold:</p><ol><li>Understanding how performance impacts our business: <a href="https://lucianohgo.com/posts/the-road-to-great-product-performance-first-steps#measure-real-user-metrics-and-conversion-metrics">Measure</a></li><li>Preventing silent degradation beyond a point: <a href="https://lucianohgo.com/posts/the-road-to-great-product-performance-first-steps#measure">Measure</a> and <a href="https://lucianohgo.com/posts/the-road-to-great-product-performance-first-steps#lock-audits-and-continuous-improvement">Lock</a></li><li>Automatizing the knowledge transfer: <a href="https://lucianohgo.com/posts/the-road-to-great-product-performance-first-steps#lock-audits-and-continuous-improvement">Lock</a></li></ol><h4><strong>Measure: Real User Metrics and Conversion Metrics</strong></h4><p>We’ve always had an underlying feeling that performance was an issue for our users and that we would improve their experience by optimizing our product but, before measuring, we failed to understand just how much that is.</p><p>Since we started measuring and tagging our users based on how fast the product was for them, we’ve been able to better understand how their behavior is impacted.</p><p><a href="https://lucianohgo.com/posts/avoid-losing-users-and-conversions">I’ve written about this</a> and also <a href="https://lucianohgo.com/posts/the-road-to-great-product-performance-first-steps#see-also">there’s a lot of relevant content about it</a>, so I’ll just leave the main points here:</p><ol><li>Start collecting <a href="https://web.dev/user-centric-performance-metrics/">Real User Metrics</a> as soon as possible;</li><li>Track this in a way you can correlate it with your business and user metrics;</li><li>Don’t use only average and median a lot of your users are better described by the higher percentiles (p75, p90, p99, <a href="http://blog.tacertain.com/p-four-nines/">p99.99</a>);</li><li>Build discoverable, accessible, and easy to use dashboards showing these metrics and how they relate to your business.</li></ol><figure><img alt="Shows a graph of the distribution of users based on First Input Delay Metrics. Fast being at 84%, moderate at 9% and slow 7%" src="https://cdn-images-1.medium.com/max/895/1*otNscjQ7AHMLyDvhl-4mdA.png" /><figcaption><a href="https://web.dev/fid">First Input Delay</a> metrics in QuintoAndar for a week. Visualizations like this, created based on Real User Metrics, can be useful to understand the evolution of your product’s performance</figcaption></figure><h4>Lock: Audits and Continuous Improvement</h4><p>Locking here means trying our hardest to catch code that can degrade performance before it goes into production. Hence working with alarms, audits, and mainly <a href="https://en.wikipedia.org/wiki/Continual_improvement_process">Continuous Improvement (CI)</a>.</p><blockquote><em>Testing performance in the lab is essential when developing new features. Before features are released in production, it’s impossible to measure their performance characteristics on real users, so </em><strong><em>testing them in the lab before the feature is released is the best way to prevent performance regressions</em></strong><em>.</em></blockquote><blockquote><em>— </em><a href="https://web.dev/user-centric-performance-metrics/"><em>Philip Walton</em></a></blockquote><p>When we think about this, we usually understand the regression side and why we’d like to prevent that, but we oftentimes miss the main point that <strong>better audits and CI are our greatest tools for automatic knowledge sharing</strong>. When we design our checks and CI, we must understand that and work towards sharing knowledge and raising the bar of the company as a whole. When engineers feel that the constraints and limitations are quality standards that will enable them to grow and not hindrances, we’ve met our goal with our CI pipeline.</p><blockquote><em>Better audits and CI are our greatest tools for automatic knowledge sharing</em></blockquote><p>We’re still diligently working in our audits and CI pipeline and far from perfect, but our performance tests currently consist of:</p><ol><li><a href="https://web.dev/use-lighthouse-for-performance-budgets/">Lighthouse CI Performance Budgets</a>: We use these to prevent increases in Javascript size, Image Size, Requests Counts and Total Size of each of our main entry points — Our <a href="http://quintoandar.com.br/">Homepage</a>, our <a href="http://quintoandar.com.br/alugar/imovel/sao-paulo-sp-brasil">Search Page</a>, and our <a href="https://www.quintoandar.com.br/imovel/892879684">Listing Page</a>. This is our most important audit and the one that gives us more safety, but the others allow us to better understand the issues;</li><li><a href="https://github.com/danger/danger">Danger</a> script for file sizes: While the most important thing is measuring the impact in each route separately, distinct file sizes also impact our users in different ways, so we track the sizes on our most important files, either because they’re widespread on different pages or why they’re already big, and try not to increase them too often;</li></ol><figure><img alt="Image shows two CI steps side to side. One for performance budgets and one for chunk size differences" src="https://cdn-images-1.medium.com/max/1024/1*1_EJwmp0wlIXe76Z7PYocQ.jpeg" /><figcaption>CI steps that we run on every PR. The left one is the lighthouse performance Budgets, and the right one is our chunk size budget audit</figcaption></figure><p>We’re currently working on adding more audits and experimenting with new ones. Since we’re directly impacting how code is shipped in the company, before being used widely, we must first guarantee that each audit:</p><ol><li><strong>Does not</strong> give false negatives;</li><li><strong>Minimizes</strong> false positives: This is the goal, but the former is a restriction. If an audit gives too many false negatives, people will lose faith in its usefulness. False positives are worse than not having the check since it’s wasting developer time and patience.</li></ol><h3>Step Three: Make performance something that the Company values</h3><blockquote><em>Share learnings, the potential in results and what was already achieved to engage the Product Management, Design and Business areas of the company. Build tools to lower the barriers and incentivize the Engineering team.</em></blockquote><p>Some of the work done in the previous steps allows us to shed light on how important Performance is for our business, but we need to put it to work:</p><h4>1. Correlate business and performance metrics and display them in strategic times</h4><p>If you’ve set up your Real User Metrics collection in a way you can correlate this data with conversion and business metrics, you’ve got a real weapon to help people understand the potential improvements in performance could have in improving the business. I’ve given some examples to that in a <a href="https://lucianohgo.com/posts/avoid-losing-users-and-conversions">different article</a>, but find what works best for your business and make it visible to the people who matter.</p><p>Just measuring isn&#39;t enough though, you need to shed light on those results, communicate them in meetings both technical and strategic.</p><h4>2. Work on relevant and big optimizations</h4><p>In order for users to barely see a difference in time duration, performance has to be changed by a minimum of 20%. Ideally, we should <a href="https://www.machmetrics.com/speed-blog/highlights-perfmatters-2018-web-performance-conference/">aim for 30% speed improvements</a>. This will give you meaningful work to do, perceived by all your users, and by the people who work in the company. Something that is clearly felt will hurt when it goes away.</p><p>The good news is, there will usually be a <a href="https://mediatemple.net/blog/web-development-tech/low-hanging-fruit-web-performance/">lot of low hanging fruits</a>. Find these and start solving them; some common ones are:</p><ol><li>Using <a href="https://brotli.org/">Brotli</a>: This usually single-handedly lowers your bundle size by 30% and is <a href="https://caniuse.com/brotli">very widely available</a>. Use Brotli when you can, for all other cases, make sure you’re using Gzip</li><li>Improving your Code Splitting:</li><li>Optimize images, fonts, javascript, CSS, etc: Minify what you can, remove parts that you don’t use, encode and size images appropriately;</li><li>Use a CDN: Content Delivery Networks (CDNs) work great for serving static files and will keep that done close to your users</li></ol><p>I could go on, and on, but you’re in a way better position to find your impactful low hanging fruits!</p><h4>3. Share and celebrate success (and failure) stories</h4><p>Impacting the core values starts with each individual and bubbles up from that. Create the habit of sharing and celebrating success within your team first and quickly expand this to the whole company. Making sure people get the credit they deserve for what they deliver.</p><p>Internally, this will spark up creativity and engagement towards the topic. Externally, it works as a way to attract talented people and shows commitment to your users.</p><p>Take Etsy’s example:</p><blockquote><em>“The performance team at Etsy maintains a dashboard celebrating people on other teams who contribute to performance improvements. we include their photo, a graph showing the performance improvement, and a brief description of their solution.” — </em><a href="http://designingforperformance.com/changing-culture/"><em>Lara Hogan on “Changing Culture at Your Organization</em></a><em>”</em></blockquote><h4>4. Create tools and an environment that helps people do the right thing</h4><p>Do the work for Step two and make performance reports and budgets something that is visible to the whole company, especially to the Engineers, and give your company a way to work through them. In QuintoAndar, we’ve set up a feel different tools that help us with that:</p><ol><li>Automatic bundle analysis report on every pull request: For every single pull request, we publish runnable <a href="https://www.npmjs.com/package/webpack-bundle-analyzer">bundle analysis reports</a> to help on debugging and finding the root cause of issues</li><li>Application size difference on every pull request: A short report that shows how each part of our application varied in size and gives a quick overview of where performance was improved and deteriorated;</li><li>Lighthouse runs that can be compared with previous builds: We use <a href="https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/getting-started.md">lighthouse ci</a> for this, and it really helps understand what each and every commit has done to important performance metrics</li><li>Performance-related forum: We’ve set up a channel where people can ask questions, request for tools, share knowledge, and discuss the topic in general.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*siSnOw2O9scWhVQFVIzWkw.png" /><figcaption>Our bundle reports: Making debugging and investigation easy helps lower the barrier for performance optimizations</figcaption></figure><p>When we’re successful in engaging and showing the importance of the matter to the rest of the company, it will reflect on Designs that have performance in mind, on Product teams prioritizing performance optimizations, and on consistent investment in performance being made company-wide. We must remember that this isn’t the end goal; <strong>the end goal here is providing our users with best-in-class User Experience. Working on performance is often a requirement to achieve that goal, and there’s only so much we can postpone it.</strong></p><h3>Conclusion</h3><ul><li>The sooner you start working on your product’s performance, the better;</li><li>Knowledge and engagement are the most critical challenges to solve so focus on that;</li><li>Performance constraints will raise the bar for your engineers and provide great value for your users, make sure everyone understands that and the cycle may be self-reinforcing;</li><li>Set up a group;</li><li>Measure and Lock;</li><li>Make performance something that the Company values.</li></ul><p>Do you think the main three steps should contain something else? Would you like to have a more in-depth analysis of any or all of the points above? <a href="https://twitter.com/hg_Luciano">Let me know</a> so we can learn together :)</p><p>Originally posted at <a href="https://lucianohgo.com/posts/the-road-to-great-product-performance-first-steps">https://lucianohgo.com/posts/the-road-to-great-product-performance-first-steps</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d038ca238d24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Memoization Cheatsheet: 5 different ways to memoize and why it matters]]></title>
            <link>https://medium.com/swlh/react-memoization-cheatsheet-5-different-ways-to-memoize-and-why-it-matters-7a47289891bc?source=rss-96aa0b6597b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a47289891bc</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Luciano Holanda Gomes]]></dc:creator>
            <pubDate>Thu, 07 May 2020 11:01:00 GMT</pubDate>
            <atom:updated>2020-05-15T19:02:16.083Z</atom:updated>
            <content:encoded><![CDATA[<p>React is improving fast and new versions pack a lot of different cool features built into the library. One of the coolest is the set of tooling around <a href="https://en.wikipedia.org/wiki/Memoization">Memoization</a>. In this post, we’ll learn a few tips and tricks on the subject, things I’ve used in production, and helped me speed up heavy renders.</p><h3>Why it matters</h3><p>Memoizing is a well-known concept in computer programming, aiming to <strong>speed up programs by caching results</strong> of expensive function calls and re-using those cached results to avoid repeating those expensive operations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*b_Y6w2chuEuVbRpnaqJijw.jpeg" /><figcaption>Memoization speeding up an expensive component&#39;s render</figcaption></figure><p>When using React, depending on how big and complex your component tree is, <strong>the process of rendering might be one of these expensive operations</strong>. The process of <a href="https://reactjs.org/docs/reconciliation.html">reconciliation</a> alone might already be too heavy if it always has to go over the whole tree. This kind of computation, when done in the UI thread, can impose a heavy tax on the user experience, making your UI non-responsive and sluggish. In fact, if we want to meet <a href="https://developers.google.com/web/fundamentals/performance/rail#goals-and-guidelines">RAIL’s goals and guidelines</a> we have 50ms of time to do computations before we actually respond to user input.</p><p>A heavy, unresponsive and sluggish UI can lead to frustrated users and a sense of fatigue while using your application and on React application avoiding re-renders is usually one of the most impactful performance improvements you can do on <a href="https://developers.google.com/web/fundamentals/performance/rendering">Rendering Performance</a></p><h3>The Cheat Sheet</h3><p>This is the actual cheatsheet :) If you know some other ways to use memoization, lemme know!</p><h3>Memoizing Components</h3><p>When a component does not need to render when its props change, we can let React know that so that it won’t try to render from that component down unless it has to.</p><blockquote><em>Note that the advantage of Memoizing components only pays off when rendering is expensive. For simple children trees it can be quicker to just do the render compared to the overhead of comparing props.</em></blockquote><h4>Function Components</h4><p>React comes with an awesome <a href="https://reactjs.org/docs/higher-order-components.html">HoC</a>: that allows us to memoize function components:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e34f3b1f8dd1970281628638d39094be/href">https://medium.com/media/e34f3b1f8dd1970281628638d39094be/href</a></iframe><h4>Class Components</h4><p>React has shipped with shouldComponentUpdate for a long time. shouldComponentUpdate is a method which is used in the <a href="https://reactjs.org/docs/reconciliation.html">reconciliation</a> algorithm to tell if a component should trigger it&#39;s render() method or not. Like with React.memo there&#39;s an easy way to implement that comparison if we only need a default shallow comparison of props:<a href="https://reactjs.org/docs/react-api.html#reactpurecomponent">React.PureComponent</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/502bc4659e53e3e3ccf2851e925b8120/href">https://medium.com/media/502bc4659e53e3e3ccf2851e925b8120/href</a></iframe><blockquote><em>Note that shouldComponentUpdate is the opposite of the comparison function for React.memo which can be interpreted as a </em><em>areEqual function</em></blockquote><h3>Memoizing Props</h3><p>When using literals, like string and number shallow comparison usually suffices for component memoization. However, if we&#39;re using functions and objects, we need to memoize them in a different way. Because:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f9ffa943f24570ff513aa3e7dc1ba519/href">https://medium.com/media/f9ffa943f24570ff513aa3e7dc1ba519/href</a></iframe><p>Don’t worry though, React ships with some cool helpers for that too :)</p><h4>Memoizing Functions</h4><p>To memoize functions, we can use <a href="https://reactjs.org/docs/hooks-reference.html#usecallback">useCallback</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/139b8f8fdfad574e85c122d994bfdf3d/href">https://medium.com/media/139b8f8fdfad574e85c122d994bfdf3d/href</a></iframe><p>Example of usage in a component:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43e1bbc095d861130e78c848be727b89/href">https://medium.com/media/43e1bbc095d861130e78c848be727b89/href</a></iframe><h4>Memoizing heavy computations, Objects, Arrays, Sets, etc</h4><p>To memoize the return of heavy computation functions, Objects, Arrays, Sets, etc we can use useMemo. We’re meant to use this <strong>only if the value needs to change based on a certain property</strong>, <a href="#consistent-reference-when-content-does-not-change">if you need a consistent reference there is another way using useRef</a></p><p>Up until now, we were memoizing values to prevent the render from happening. With useMemo however, we can prevent heavy computation from happening as well by storing a value in memory.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a12ef9cd11acec8c3aa6f4ed63064aa/href">https://medium.com/media/6a12ef9cd11acec8c3aa6f4ed63064aa/href</a></iframe><p>Example of usage in a component:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b33a6f7815af2cb4dcce6f06a9f4beb3/href">https://medium.com/media/b33a6f7815af2cb4dcce6f06a9f4beb3/href</a></iframe><blockquote><em>Note that most of the time you shouldn’t be doing heavy computation inside render methods, if possible, you should avoid doing that in the UI thread altogether. If you’re interested, </em><a href="https://twitter.com/DasSurma"><em>Surma</em></a><em> has a </em><a href="https://web.dev/off-main-thread/"><em>really good article on how to move computation off of the main thread</em></a></blockquote><h4>Consistent Reference When Content Does Not Change</h4><p>To get a consistent reference to a value, we can use the <a href="https://reactjs.org/docs/hooks-reference.html#useref">useRef</a> hook:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/18db12a30fab7af24146c3e64eea3c76/href">https://medium.com/media/18db12a30fab7af24146c3e64eea3c76/href</a></iframe><p>Example of usage in a component:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d6b10287836f0af49d090ae0fabbdfe4/href">https://medium.com/media/d6b10287836f0af49d090ae0fabbdfe4/href</a></iframe><p>We can use it to <strong>get a reference to initial prop values as well</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c76e36cd80d2890e0ff0e0e8c1cf975e/href">https://medium.com/media/c76e36cd80d2890e0ff0e0e8c1cf975e/href</a></iframe><h3>See Also</h3><ol><li><a href="https://reactjs.org/docs/react-api.html">React Top-Level API — React</a>;</li><li><a href="https://reactjs.org/docs/hooks-reference.html#useref">Hooks API Reference — React</a>;</li><li><a href="https://reactjs.org/docs/hooks-faq.html#is-there-something-like-instance-variables">Hooks FAQ — React</a>;</li><li><a href="https://blog.logrocket.com/rethinking-hooks-memoization/">You’re overusing useMemo: Rethinking Hooks memoization — LogRocket Blog</a>;</li><li><a href="https://developers.google.com/web/fundamentals/performance/rail">Measure Performance with the RAIL Model — Web Fundamentals</a>;</li><li><a href="https://developers.google.com/web/fundamentals/performance/rendering">Rendering Performance — Web Fundamentals</a></li><li><a href="https://web.dev/off-main-thread/">Use web workers to run JavaScript off the browser’s main thread — web.dev</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a47289891bc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/react-memoization-cheatsheet-5-different-ways-to-memoize-and-why-it-matters-7a47289891bc">React Memoization Cheatsheet: 5 different ways to memoize and why it matters</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance is a Feature: Avoid Losing Users and Conversions]]></title>
            <link>https://medium.com/quintoandar-tech-blog/performance-is-a-feature-avoid-losing-users-and-conversions-65f6f7ab8020?source=rss-96aa0b6597b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/65f6f7ab8020</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Luciano Holanda Gomes]]></dc:creator>
            <pubDate>Mon, 04 May 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-05-04T11:50:02.568Z</atom:updated>
            <content:encoded><![CDATA[<p>Improving and protecting your website performance can directly affect your results. Understanding just how much will give you and your team a powerful tool and a new way to impact your users’ experience</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jsqLe32l-1KCBfGYaxg04Q.jpeg" /><figcaption><em>Your website if you don’t take care of its performance — photo by </em><a href="https://unsplash.com/@pascalvendel?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Pascal van de Vendel on Unsplash</em></a></figcaption></figure><p>Like <a href="https://jmperezperez.com/about-me/">José M. Perez</a> said beautifully in his article <a href="https://jmperezperez.com/fostering-web-performance-culture/">Fostering a Web Performance Culture</a>:</p><blockquote><em>Web Performance is not only about understanding what makes a site fast. </em><strong><em>It’s about creating awareness amongst both developers and non-developers. Performance is a feature and needs to be prioritized as such</em></strong><em>.</em></blockquote><p>Mainly to get non-developers to buy-in, we need to size how much improving performance impacts business metrics and precisely to what degree each deterioration impacts the same metrics.</p><p>In <a href="https://quintoandar.com.br/"><strong>QuintoAndar</strong></a> we recently implemented tools that are already allowing us to do this kind of analysis, and I’d like to share with you some of these findings focusing on two things that are usually very important for any business:</p><ol><li><a href="#79e1">User Acquisition</a></li><li><a href="#a74c">User conversion</a></li></ol><h3>User Acquisition: Bounce Rate</h3><p>According to <a href="https://support.google.com/analytics/answer/1009409?hl=en">Google</a>:</p><blockquote><em>Bounce rate is single-page sessions divided by all sessions, or the percentage of all sessions on your site in which users viewed only a single page and triggered only a single request to the Analytics server.</em></blockquote><p>So if we have a high bounce rate, users are not staying on our website and leaving before performing any relevant action. Intuitively, a slow website might lead to more users leaving the page, but <strong>it’s hard to grasp just how many users we’re losing for each second longer our page takes to load</strong>, hint, it’s more than you may think it is (well at least for us, it was):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7J7hhTBdEorxpkSO.jpg" /><figcaption><em>In these 12 weeks, we lowered our average load time by </em><strong><em>33.3%</em></strong><em> and bounce rate by </em><strong><em>32.65%</em></strong></figcaption></figure><p>After seeing this trend, <strong>we started looking to Web Performance improvements not only as a way to drive more conversion but also as a tool for user acquisition</strong>. Improving our performance metrics leads to more users looking at the site for two main reasons:</p><ol><li>Better UX: Improving performance improves everyone’s usage of our product;</li><li>The website becomes accessible to them. Users with older devices or slow networks start being able to use our products.</li></ol><p>More people using our product usually leads to more customers down the line. But we don’t just add volume. In this next section, I’ll try to show you that we’re also making our funnel more efficient when we do performance optimizations.</p><h3>Conversion: Give your users the UX they deserve</h3><p>In <a href="https://quintoandar.com.br/">QuintoAndar</a>, we’re passionate about UX and have been since I joined three years ago (go check out our <a href="https://medium.com/quintoandar-design">QuintoAndar Design Blog</a>). We do research, lab tests, and field tests, both quantitative and qualitative, and strive to empower our users through the products we provide to them.</p><p>With that experience, we’ve come to understand that our product’s performance is an integral part of that UX, so it shouldn’t be treated any differently and have started tracking more and more <a href="https://web.dev/user-centric-performance-metrics/">User-Centric Performance Metrics</a> both in the <a href="https://web.dev/user-centric-performance-metrics/#in-the-field">field</a> and in the <a href="https://web.dev/user-centric-performance-metrics/#in-the-lab">lab</a>.</p><p>We want to improve our users’ experience, so we frame these metrics on terms that are relevant to our users:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*sa1bjjp8JlPdmVBN2ykKXw.png" /><figcaption><em>Performance metrics Questions table — taken from </em><a href="https://web.dev/user-centric-performance-metrics/"><em>web.dev’s User-Centric Performance Metrics</em></a></figcaption></figure><p>There are many different metrics we use for each of these steps, but we’ll focus on how two important ones have affected our conversion metrics:</p><ol><li><a href="#c498"><strong>First Contentful Paint (FCP)</strong></a>: Measures the time from when the page starts loading to when any part of the page’s content is rendered on the screen. In our case, this metric is, as of now, very close to the value of another metric that we heavily recommended tracking: <a href="https://web.dev/lcp/">Largest Contentful Paint (LCP)</a>;</li><li><a href="#78b8"><strong>First Input Delay (FID)</strong></a>: measures the time from when a user first interacts with your site (i.e., when they click a link, tap a button, or use a custom, JavaScript-powered control) to the time when the browser can respond to that interaction</li></ol><h3>Paint</h3><p>The main questions involved in paint metrics are:</p><ol><li><strong>Is it happening?</strong>: Receiving a paint is what gives the user the idea that the page is loading, and somebody responded to the request the user made. If we don’t respond quickly, a lot of our users will feel like there’s a problem and leave altogether;</li><li><strong>Is it useful?</strong>: A lot of pages are mostly about content, and the content of a page is what makes it useful;</li></ol><p>Based on benchmark values from <a href="https://developers.google.com/speed/docs/insights/v5/about#distribution">page speed insights</a>, we classified our Users’ experience in what we called UX buckets. The results we had classifying user paint experience for one of our most essential conversion metrics were impressive:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ASsZbRsm12DSYvEf.jpg" /><figcaption><em>Paint speed and experience will directly affect your conversion</em></figcaption></figure><p>Some insights from that data:</p><ol><li>For mobile users, moving from slow to a moderate UX bucket would mean <strong>increasing his chance to convert by 12%</strong>;</li><li>For mobile users, moving from slow to a fast UX bucket would mean <strong>increasing his probability to convert by 22.2%</strong>;</li><li>Bad First Contentful Paints affect mobile users way harder than desktop users;</li><li>Paints directly affect bounce rate and are one of the most correlated metrics with it;</li><li>Long load times tax the user experience beyond a single Session. In other words, even if in the future, we improve the load time, the user may still carry the impression that the website is slow and be less likely to convert.</li></ol><h3>Interactivity</h3><p>The main questions involved in interactivity metrics are:</p><ol><li><strong>Is it usable?</strong>: Content visible that invites interaction but cannot respond to it can be frustrating for your users</li><li><strong>Is it delightful</strong>: Responding to interaction may still not be enough if such a response comes with the appearance of a sluggish and janked experience.</li></ol><p>We did the same process we did for <a href="#paint">paint</a> for interactivity metrics and also found impressive results</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0KdilTpAS91UZ6qP.jpg" /><figcaption><em>Interactivity will directly affect your conversion</em></figcaption></figure><p>Some insights from that data:</p><ol><li>For all users, moving from slow to a moderate UX bucket would mean <strong>increasing his chance to convert by 11.2%</strong>;</li><li>For all users, moving from slow to a fast UX bucket would mean <strong>increasing his probability to convert by 22%</strong>;</li><li>Interactivity affects both mobile and desktop users heavily;</li><li>Long wait times for interactivity will tax the user experience beyond a single Session.</li></ol><h3>In summary</h3><ol><li>Performance is a feature: Protect it and improve it like so;</li><li>Understanding user behavior helps you quantify and validate performance improvements in terms of business results;</li><li>Performance can greatly impact your conversion and acquisition metrics;</li><li>Bad performance taxes the user experience beyond a single Session. In other words, even if in the future, we improve the load time, the user may still carry the impression that the website is slow and be less likely to convert.</li><li>We can understand and improve performance in multiple ways each composing a relevant part of the users’ experience</li></ol><h3>See Also</h3><ol><li><a href="https://web.dev/metrics">Metrics — web.dev</a></li><li><a href="https://jmperezperez.com/fostering-web-performance-culture/">Fostering a Web Performance Culture — José M. Perez</a></li><li><a href="https://developers.google.com/web/fundamentals/performance/get-started">Load Performance — Web Fundamentals</a></li></ol><p>Would you like to know more about how we track these metrics in production? Let me know, and I can follow up with a series of posts on the topic! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65f6f7ab8020" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quintoandar-tech-blog/performance-is-a-feature-avoid-losing-users-and-conversions-65f6f7ab8020">Performance is a Feature: Avoid Losing Users and Conversions</a> was originally published in <a href="https://medium.com/quintoandar-tech-blog">Blog Técnico QuintoAndar</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improving React Runtime Performance]]></title>
            <link>https://medium.com/quintoandar-tech-blog/improving-react-runtime-performance-dec0a5a4ffda?source=rss-96aa0b6597b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/dec0a5a4ffda</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[front-back-end]]></category>
            <dc:creator><![CDATA[Luciano Holanda Gomes]]></dc:creator>
            <pubDate>Thu, 05 Jul 2018 15:36:22 GMT</pubDate>
            <atom:updated>2018-08-02T18:00:09.930Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<h4><em>Make it a habit to measure your performance. There may be a lot of easy but impactful fixes that you need to do;</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6lMpku9ygA1Z_UBZzgE6mA.jpeg" /><figcaption>A highway because, you know, like, fast things and such</figcaption></figure><p>At <a href="https://quintoandar.com.br/">QuintoAndar</a> we have been working hard on building our Single Page Application, Progressive Web App as a way to improve the experience of our users. As a part of this process, one of the main concerns was to have our web application feel native, providing a smooth and fast 🚀 experience. If you ever built a large javascript application, then you already know how much of a challenge this is.</p><p>During that process, we learned a lot about how to maintain good productivity while avoiding most pitfalls that can deteriorate performance. However, if you want to develop fast, some things will break and one thing that has a knack for breaking is performance.</p><p>With that in mind, <strong>it has become a habit for us to profile our pages regularly, fix any performance errors found and profile again </strong>while also keeping constant tabs on our <a href="https://developers.google.com/web/tools/lighthouse/">Lighthouse</a> score. In this post, you&#39;ll learn some of the techniques we use for profiling, the lessons we learned on how to fix this issues and the impact that had on the experience at the website through some real-world examples of what we&#39;ve done.</p><h3>A Primer on Runtime Performance</h3><p>A lot of the performance issues we find in the application are component-specific and have very particular characteristics, but some kinds of optimizations tend to be more frequent. We search for these first when measuring and looking for ways to improve containers or components across our apps. Those are:</p><ol><li><strong>Deferring rendering</strong>: We try to defer the renders of heavy &amp;/or components that require user input to be visible (search bars, autocompletes, menus, etc.).</li><li><strong>Preventing unnecessary </strong><a href="https://reactjs.org/docs/reconciliation.html"><strong>reconciliation</strong></a>: This category already encompasses many different kinds of problems, but finding them is usually done through the same process, i.e. <a href="https://blog.logrocket.com/make-react-fast-again-part-3-highlighting-component-updates-6119e45e6833">highlighting component updates</a> &amp;/or finding unnecessary updates in the User Timing panel (we&#39;ll get to that)</li><li><strong>Preventing Components from overly complicating the render tree</strong>: Some components create very long lists, which we can solve through virtualization using, for example, <a href="https://github.com/seatgeek/react-infinite">react-infinite</a> or <a href="https://bvaughn.github.io/react-virtualized/#/components/List">react-virtualized</a>. Also, if you, like us, use a styling lib that can generate classes based on props, e.g. <a href="https://github.com/styled-components/styled-components">styled-components</a>, some components can create too many classes and this can become a problem for <a href="https://developers.google.com/speed/docs/insights/browser-reflow">Reflows/Layouts</a> and repaints, especially if you do it based on user input like dragging a map or scrolling through the dom.</li></ol><h3>Profiling</h3><p>All profiles found here will follow the process below:</p><ol><li><a href="https://developers.google.com/web/tools/chrome-devtools/remote-debugging/">Setup chrome remote debugging</a> on a mobile device. Even better if we<em> use the least performant device we wish to support + throttle network to at least the Fast 3G setting</em>;</li><li>F<a href="https://developers.google.com/web/tools/chrome-devtools/remote-debugging/local-server">orward the port</a> used by the React application;</li><li>Run the application in development &gt; Open a tab on the browser to your application &gt; Open Chrome Dev Tools &gt; Performance &gt; Inspect mobile device;</li><li>To profile initial mounting: Hit Start Profiling and reload page button;</li><li>To profile interactions with the page, after page load, hit the Record ⚫️ button; Interact with the page and hit the Stop 🔴 button;</li><li>Interpret the results</li></ol><h3>Landing Page (quintoandar.com.br)</h3><p>We ran the profiler in the web page to seek possible improvements, and some things jumped to sight. Like the &lt;SearchBar/&gt; component waiting on the render of the &lt;AutoComplete/&gt; which is an initially non-visible component:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1we5NBYznz0I8KqgcOSD7w.jpeg" /><figcaption>104.5 ms spent mounting the SearchBar Component and over half is the AutoComplete</figcaption></figure><h4>Deferring Render</h4><p>Components that are not initially visible can be loaded incrementally to prioritize the content that is.</p><p>To defer render we could use two different approaches:</p><ol><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame">window.requestAnimationFrame</a></li><li>Predefined delay (using setTimeout or setInterval)</li></ol><p>They&#39;re very similar and simple to implement. However, we usually prefer requestAnimationFrame, that way we guarantee that the state update of the component happens only at the start of a frame. Here&#39;s an implementation that worked for us:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1db7f6c90275d55865194d1a90a842dd/href">https://medium.com/media/1db7f6c90275d55865194d1a90a842dd/href</a></iframe><p>If other pages also contain this components or if we can tolerate a slightly longer wait after the initial render, we can go one step further and import them dynamically. To better understand that and how to do it, you can check webpack&#39;s documentation, which has a detailed <a href="https://webpack.js.org/guides/code-splitting/">Code Splitting</a> section.</p><p>One other thing to note is that if you, like us, have a Server Side Rendered react application, whenever you defer the component render by using componentDidMount, it won&#39;t be rendered on the server, and we would have to go some steps further if we&#39;d like to preload this chunk.</p><p>After deferring the SearchBar render we could lower the mounting time in half:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ExxxKqwC9pVgo97ZfdFVw.png" /><figcaption>Cutting the time of mounting in half without any impact to the end user</figcaption></figure><p>Searching further in the timeline we can also see an update in the SearchBar that doesn&#39;t make sense since no props changed on this component:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*HHhKIp4mV7wAGoqxEYvFZw.png" /><figcaption>Useless update on SearchBar triggered by a state change</figcaption></figure><p>This was triggered because the component state was being used to track whether the Google API was loaded or not, hence there was a setState({ isGoogleLoaded: true }) being called for a value that has no impact in the render function and was very easy to remove, just by changing it to an instance variable, i.e.: this.isGoogleLoaded = true</p><p>Besides that, we could also find some other updates that were triggered and shouldn&#39;t be on different components, like these, for example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zOX3sPLCAXw_0r4Auq1BBg.png" /><figcaption>Updates that should be triggered causing a longer update cycle than necessary</figcaption></figure><p>There are quite a few updates triggered in this components, and their props are not changing, only their parent&#39;s. Usually happens due to<em> </em>the common<em> </em><strong><em>misconception</em></strong><em> that components which are Pure functions are also PureComponents</em>. Hopefully, <a href="https://github.com/acdlite/recompose">recompose</a> provides a nice HOC, pure, that can make the component pure without us having to turn it into a class. Most of these updates were solvable that way, but some were more tricky.</p><p>There are components which receive objects as props and use only one of the values inside the object; this means that, if some other value inside the object changes, they should not be updated. That was the case for the WorkWithUs component; it uses an object that has a structure similar to:</p><pre># WorkWithUs props</pre><pre>location: { <br>  search: &#39;value&#39;<br>  ...<br>}</pre><p>And only uses the search property. This prop is injected by a HOC that is part of an external lib and used in a lot of different places. So what we did was flatten this location prop and restrict the update to only the search making it a pure component:</p><pre>import mapProps from &#39;recompose/mapProps&#39;;<br>import pure from &#39;recompose/pure&#39;;<br>import compose from &#39;recompose/compose&#39;;</pre><pre>const WorkWithUs = compose(<br>  hocThatInjectsProp,<br>  mapProps(({ location: { search } }) =&gt; ({ search })),<br>  pure,<br>)(WorkWithUsComponent);</pre><p>After dropping some pure at some components, we managed to cut that update cycle to a portion of the time it occupied:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l-KxZm_h18-44V25I6omfA.png" /><figcaption>Time went from 132.80 ms to 82.80ms &amp; reduced the work done in this cycle by avoiding updates</figcaption></figure><h3>Search Page (quintoandar.com.br/alugar/imovel)</h3><p>Moving to the search page, this is a page with a lot more user interaction. We have two different versions of this page the Desktop version and the mobile version:</p><ol><li>Mobile</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*KFkbhlo8VeJoZUKlFMENSg.png" /><figcaption>Mobile Search Page</figcaption></figure><p>2. Desktop:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKVp1UA0kBJYa13424fn7g.png" /><figcaption>Desktop Search Page</figcaption></figure><p>These screens reutilize the HouseList and Map components. So the first thing we did, since we have a possibly very long list, was to <strong>virtualize the list</strong>, and to help us with that we decided to use the <a href="https://github.com/seatgeek/react-infinite">react-infinite</a> library to do this virtualization.</p><p>But for some reason, after scrolling a bit in the list, both on the desktop and mobile pages, we saw the input latency increase drastically, both for scrolling and dragging the map, which are the two primary user interactions with this page. Checking the timeline and the updates, we couldn&#39;t see anything abnormal or any updates that shouldn&#39;t be happening upon scrolling, so we went to another section at the timeline, the <strong>Main </strong>which shows the activity on the Main thread:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AjNr6xyJacVpIKB4zMorBg.png" /><figcaption>Map Drag-Response Lifecycle</figcaption></figure><p>This timeline shows us something very unusual: a long <strong>Recalculate Style </strong>time, even considering that this is a very style heavy, we shouldn&#39;t see 128.8ms of style calculation time within one Drag-Response. So we went to the code to try and find what was causing this.</p><p>As it turns out, the images are within an &lt;AspectRatioContainer/&gt; which is a container that sets their size appropriately so that they conform to the AspectRatio that we expect for images and there were two problems with this container, as we can see in the code below:</p><pre>// AspectRatio.js Before</pre><pre>function AspectRatioContainer(props) {<br>  const Container = styled.div`<br>    ${(props) =&gt; `background: url(https://medium.com/$%7Bprops.loadingSrc%7D) 0 0/100% 100% no-repeat;`}<br>    ...<br>  `;</pre><pre>return (<br>    &lt;Container aspectRatio={props.aspectRatio} className={props.className} innerRef={props.innerRef}&gt;<br>      {props.children}<br>    &lt;/Container&gt;<br>  );<br>}</pre><ol><li>1 class per render, because the component calls the styled() factory inside the render method</li><li>The class changes on each different background URL. So, for each different image, we used as a background, styled components was creating a new class, clogging our CSSOM tree with A LOT of unused classes.</li></ol><p>So this was also an easy fix, we just had to use the <a href="https://www.styled-components.com/docs/api#attrs">styled attrs</a> to set the value of the background and remove the definition of the styled components from the render function, like so:</p><pre>const Container = styled.div.attrs({<br>  style: ({ loadingSrc }) =&gt; ({<br>    background: `url(https://medium.com/$%7BloadingSrc%7D) 0 0/100% 100% no-repeat`,<br>  }),<br>})`<br>  ...<br>`;</pre><pre>function AspectRatioContainer(props) {<br>  return (<br>    &lt;Container aspectRatio={props.aspectRatio} className={props.className} innerRef={props.innerRef}&gt;<br>      {props.children}<br>    &lt;/Container&gt;<br>  );<br>}</pre><p>With this small change, we were able to get way faster Drag-Response cycles, and halved the recalculate style portion of this update:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8Yo0FRArzapxyZldQ164g.png" /><figcaption>Faster RecalculateStyle by preventing superfluous class creation</figcaption></figure><p>These optimizations are some examples from an ongoing work that we do while also making sure that we keep up with new features and releases. There&#39;s a lot we already know that we need to do and a lot will come as we release new features. If you find something that we could be doing better, let us know and comment below!</p><h3>Summing Up</h3><ol><li>Make it a habit to measure your performance. Every new feature can deteriorate the performance of the whole page; Measure, optimize and measure again;</li><li>Pay special attention to user interaction, like scrolling, dragging, clicking and typing;</li><li>Stateless Components are <strong>not </strong>the same as React.PureComponent. Plus, we can use recompose to convert these components to PureComponents easily and also to do some prop juggling; But, most importantly, always avoid useless updates;</li><li>Beware of the size of your render tree, clogging the DOM &amp;/or the CSSOM can have a noticeable negative impact.</li></ol><p><em>If you&#39;d like challenges like this and would like to contribute to making rent cool and easy, we are always looking for talented, eager to learn people to </em><a href="https://carreiras.quintoandar.com.br/"><em>join us in São Paulo</em></a><em>.</em></p><p><em>OBS.: We already do a lot of the good practices for performance and scalability, like the ones </em><a href="https://medium.com/@paularmstrong/twitter-lite-and-high-performance-react-progressive-web-apps-at-scale-d28a00e780a3"><em>Twitter</em></a><em> did, like following </em><a href="https://webpack.js.org/guides/caching/"><em>asset caching best practices</em></a><em>, having a </em><a href="https://css-tricks.com/adding-a-cdn-to-your-website/"><em>CDN</em></a><em> to minimize round trips, etc. This kind of optimization should come first and be your primary focus initially (:</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dec0a5a4ffda" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quintoandar-tech-blog/improving-react-runtime-performance-dec0a5a4ffda">Improving React Runtime Performance</a> was originally published in <a href="https://medium.com/quintoandar-tech-blog">Blog Técnico QuintoAndar</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>