<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 1, 2017 at 2:32 PM, Mike Conley <span dir="ltr"><<a href="mailto:mconley@mozilla.com" target="_blank">mconley@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello folks,</div><div><br></div><div>Over the course of several weeks, I've been slowly accumulating information on best practices and tips to help us front-end engineers write code with lower risk for introducing jank to the user.</div><div><br></div><div>I've published that information here: <a href="https://developer.mozilla.org/en-US/Firefox/Performance_best_practices_for_Firefox_fe_engineers" target="_blank">https://developer.mozilla.org/<wbr>en-US/Firefox/Performance_<wbr>best_practices_for_Firefox_fe_<wbr>engineers</a></div><div><br></div><div>I was originally collaborating with a few people on it in a Google Doc, but it's stabilized enough now to post on MDN. Do feel free to continue to add tips (or corrections!).</div><br></div></blockquote><div><br></div><div>Thanks for putting this together, Mike!</div><div><br></div><div>This isn't discrediting your excellent work. But I feel like I need to ask a question: how do we have machines identify when best practices aren't being followed? After all, machines will catch the failures they're taught to catch 100% of the time, which is better than human code review will do. Would it be possible to have features (possibly limited to debug builds) that detect when bad patterns are being used and raise warnings or errors? Or for things like detecting synchronous flushes we could have the test harness automatically record the count and annotate certain tests with an allowed value (kind of like how reftest expectations work). Obviously some patterns are hard or impossible to codify. But *anything* that we teach machines to catch for us is one less thing for humans to worry about and inevitably miss during code review.<br></div></div></div></div>