TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Digging for performance gold: finding hidden performance wins

150 点作者 markdog12大约 4 年前

10 条评论

frabjoused大约 4 年前
I personally find performance optimization on an existing, high traffic system to be some of my favorite times as a developer. You have a large number, and you have to get it as close to zero as possible. There's no mystery as to whether you improved something and it has a tangible reward.
评论 #26918861 未加载
评论 #26917704 未加载
评论 #26918595 未加载
评论 #26918234 未加载
jeffbee大约 4 年前
Great write-up. I really feel like any kind of performance optimization, compromise, or other detail should be accompanied by tests or assertions that capture all of the inputs that supported the decision. In this example, ideally the compromise necessary to support Windows XP would have come with an assertion that the minimum supported version of Windows was still XP or earlier. This way, the decision is remembered and revisited if XP stops being supported, because the build would break. I don&#x27;t know what the chrome code looks like but I imagine something like<p><pre><code> &#x2F;&#x2F; TODO: Remove this hack if we drop Windows XP assert(min_win &lt; win7) </code></pre> ... simple. I recall finding a function deep in Google search that had been &quot;optimized&quot; in x86 assembly, but way back when the cache lines were 32 bytes. On Opteron and later the &quot;optimized&quot; code was slower than idiomatic C++. That&#x27;s when I decided any kind of performance decision needs to be recorded, somehow. Either something like `assert cache_bytes==32` or just a FIXME($date) that forces someone to revisit the decision every year.
评论 #26918908 未加载
aeturnum大约 4 年前
I wish the Chrome team would dig into why my Chrome uses nearly all of two cores all of the time with one tab open. The issue (or something similar) comes up all the time on their forums and they just lock all the topics[1]. Chrome is such a resource hog under normal operation that it&#x27;s hard to say when something is going wrong.<p>[1] <a href="https:&#x2F;&#x2F;support.google.com&#x2F;chrome&#x2F;thread&#x2F;17537877?hl=en" rel="nofollow">https:&#x2F;&#x2F;support.google.com&#x2F;chrome&#x2F;thread&#x2F;17537877?hl=en</a>
评论 #26920105 未加载
评论 #26917518 未加载
评论 #26919754 未加载
评论 #26917530 未加载
matthewaveryusa大约 4 年前
Great write-up. I&#x27;ve done countless investigations like this and couldn&#x27;t have worded it better.<p>&gt;Depth vs. breadth.<p>Ah yes, which direction do you look at your program? do you look at which functions consume the most resources bottom up (probably some string or memory function in libc) or top down?<p>If you&#x27;re the person writing the system libraries for enormous platforms, probably bottom-up, but if you&#x27;re an application developer, top down. Sometimes though, especially with the performance issue described in the article you&#x27;re in the middle -- those are tough to spot!
评论 #26918693 未加载
vlovich123大约 4 年前
&gt; Chrome measures jank every 30 seconds, so Jank in 1% of samples for a given user means jank once every 50 minutes<p>Is that actually true? Doesn&#x27;t this just mean that once every 50 minutes the system has been janky for &gt;= 60s? Anything less &amp; you&#x27;re below the Nyquist frequency &amp; are unlikely to be actually sampling it, no? My knowledge of signal analysis is just what I recall from some intro university classes so there could be more involved here in this claim so happy to learn if I&#x27;m misremembering (+ it might be made more complicated because their also sampling across a population of users).<p>(Speaking as somehow who regularly has to shut down Chrome because it&#x27;s making my entire machine janky).
评论 #26915598 未加载
评论 #26915572 未加载
评论 #26915583 未加载
评论 #26915505 未加载
markdog12大约 4 年前
&gt; A subset of Canary users who have opted in to sharing anonymized metrics have circular-buffer tracing enabled<p>Where is that setting? I&#x27;m pretty sure it asks on install, but what about after that?<p>Update: Seems to be in settings -&gt; Sync and Google Services -&gt; Help improve Chrome&#x27;s features and performance
ww520大约 4 年前
Speaking of performance Chrome’s WebGL performance is quite good. Some of the stress tests I ran it came up 40% faster than Firefox. It seems Chrome is faster at ferrying the WebGL calls and large amount of data to the GPU.
PaulHoule大约 4 年前
I wrote something using Python and Pillow that prints titles, credits, and qr codes on the back of art prints.<p>I ran very much into the problem that there are not really &quot;unicode&quot; fonts but rather the web browser is patching together characters from different fonts when you use Chinese, Arabic, Emoji(s), etc.<p>I want something that looks like the card at the art museum that introduces a piece so I have just a nice serif en font and a Japanese font I like because I have a lot of Japanese subject matter.<p>If I wanted to print some math character or arabic I would have to register that typeface in my system but it is a hassle at the moment.<p>What I get for this (as compared to HTML) is that the system understands the border of the card, which is big for a 6x4 card and I can align multiple printings on both sides to the limits of the hardware.<p>Jank is the least of my problems.
评论 #26918925 未加载
Dolores12大约 4 年前
Is there anything like that for Firefox? I would love to participate.
shinycode大约 4 年前
I uninstalled Chrome and switched to an other Chromium alternative and never looked back. Never had a performance issue on my Mac since then …