电线之间:采访Microsoft Edge性能PM Nolan Lawson
by Vivian Cromwell
通過(guò)維維安·克倫威爾(Vivian Cromwell)
電線(xiàn)之間:采訪(fǎng)Microsoft Edge性能PM Nolan Lawson (Between the Wires: An interview with Microsoft Edge performance PM Nolan Lawson)
I interviewed Nolan Lawson, Web Performance PM at Microsoft Edge. He also maintains the popular open source library PouchDB together with others.
我采訪(fǎng)了Microsoft Edge的 Web Performance PM的Nolan Lawson。 他還與其他人一起維護(hù)了流行的開(kāi)源庫(kù)PouchDB 。
告訴我們一些關(guān)于您的童年以及您成長(zhǎng)的地方。 (Tell us a little bit about your childhood and where you grew up.)
I grew up in a small navy town called Bremerton, near Seattle. I had a pretty typical middle-class upbringing: my step dad worked for the naval shipyard, and my mom was a school nurse and later a school teacher.
我在西雅圖附近的海軍小鎮(zhèn)布雷默頓長(zhǎng)大。 我有一個(gè)非常典型的中產(chǎn)階級(jí)成長(zhǎng)經(jīng)歷:我的繼父在海軍造船廠(chǎng)工作,我的媽媽是一名學(xué)校護(hù)士,后來(lái)是一名學(xué)校老師。
As a child I was a voracious reader. I read lots of fantasy and horror books, from the Narnia series to everything by Stephen King. My teachers were suspicious of me reading adult horror novels, but they tolerated it because at least I was reading. I was also really into video games.
小時(shí)候,我是一個(gè)貪婪的讀者。 我讀了很多幻想和恐怖書(shū)籍,從納尼亞系列到史蒂芬·金的所有作品。 我的老師對(duì)我讀成人恐怖小說(shuō)感到懷疑,但他們?nèi)萑塘?#xff0c;因?yàn)橹辽傥以谧x書(shū)。 我也很喜歡電子游戲。
I have a great appreciation for the outdoors thanks to an early experience in the Boy Scouts. I’ve also visited France a lot because my biological father is French. That gave me a bit of a travel bug, and as an adult I moved to Ottawa, to Geneva, and then to New York City before coming back to Seattle. I moved around every few years, just on a whim.
我對(duì)戶(hù)外運(yùn)動(dòng)非常感謝,這要?dú)w功于童子軍的早期經(jīng)驗(yàn)。 我也去過(guò)法國(guó)很多,因?yàn)槲业挠H生父親是法國(guó)人。 那給了我一些旅行的煩惱,成年后我搬到渥太華,去了日內(nèi)瓦,然后又去了紐約,然后又回到了西雅圖。 我每隔幾年就動(dòng)了一下,只是一時(shí)興起。
At some point I realized it would be a good idea to go back home and be closer to family. My girlfriend also wanted to settle there, because that’s where her family is from too. I started looking for jobs around Seattle, and Microsoft became a pretty obvious choice.
在某個(gè)時(shí)候,我意識(shí)到回到家與家人更近是個(gè)好主意。 我的女友也想在那定居,因?yàn)槟且彩撬胰说募摇?我開(kāi)始在西雅圖附近尋找工作,微軟成了一個(gè)顯而易見(jiàn)的選擇。
告訴我們您的初次編程經(jīng)驗(yàn)。 (Tell us a little bit about your first programming experience.)
When I was six or seven, my uncle gave me a hand-me-down MS-DOS machine with a 5? inch floppy drive. It was ancient by today’s standards. It had basically two games: Snake and Gorillas, and it actually displayed the BASIC code before they started up. Those two games were all I could figure out to do with it.
當(dāng)我六,七歲時(shí),叔叔給了我一臺(tái)具有5?英寸軟盤(pán)驅(qū)動(dòng)器的手動(dòng)MS-DOS計(jì)算機(jī)。 按照今天的標(biāo)準(zhǔn),這是古老的。 它基本上有兩個(gè)游戲: Snake和Gorillas ,并且在啟動(dòng)之前實(shí)際上顯示了BASIC代碼。 那兩個(gè)游戲我都想辦法解決。
“I didn’t get back into programming again until I was in college.”“直到上大學(xué)后,我才重新回到編程領(lǐng)域。”I also had a book on MS-DOS programming, so I took some time to write a really simple Batch script. When the computer would start up, it would print:
我也有一本關(guān)于MS-DOS編程的書(shū),所以我花了一些時(shí)間來(lái)編寫(xiě)一個(gè)非常簡(jiǎn)單的批處理腳本。 當(dāng)計(jì)算機(jī)啟動(dòng)時(shí),它將打印:
“Hi, Nolan. Which game do you want to play? 1. Gorillas 2. Snake?”
“嗨,諾蘭。 您想玩哪個(gè)游戲? 1.大猩猩2.蛇?”
And you would type one or two depending on which game you wanted to play. I was pretty proud of that script!
然后您將根據(jù)要玩的游戲鍵入一兩個(gè)。 我為那個(gè)腳本感到驕傲!
When I was around nine, my daycare had a similar computer with even more games on it, so I decided to apply my Batch skills to it. Unfortunately, I messed up the computer and made it so you couldn’t play the games anymore. I felt guilty and it kinda scared me away. I didn’t get back into programming again until I was in college.
當(dāng)我九歲左右的時(shí)候,我的托兒所擁有一臺(tái)類(lèi)似的計(jì)算機(jī),上面有更多的游戲,因此我決定將Batch技能應(yīng)用于該計(jì)算機(jī)。 不幸的是,我弄亂了電腦并制作了它,所以您再也無(wú)法玩游戲了。 我感到內(nèi),這讓我很害怕。 直到上大學(xué),我才重新回到編程領(lǐng)域。
As an undergraduate I studied linguistics, mostly because I was learning French and Japanese at the time. I was fascinated by languages. But after graduation, I realized it was kind of hard to get a job in linguistics. As it turned out, though, my department at the University of Washington had a Master’s program in computational linguistics, which seemed like a great option career-wise. That was how I finally got back into programming.
作為一名本科生,我學(xué)習(xí)語(yǔ)言學(xué),主要是因?yàn)楫?dāng)時(shí)我正在學(xué)習(xí)法語(yǔ)和日語(yǔ)。 我著迷于語(yǔ)言。 但是畢業(yè)后,我意識(shí)到很難找到語(yǔ)言學(xué)的工作。 但事實(shí)證明,我在華盛頓大學(xué)的系擁有計(jì)算機(jī)語(yǔ)言學(xué)碩士學(xué)位,這在職業(yè)上似乎是一個(gè)不錯(cuò)的選擇。 那就是我最終回到編程的方式。
是什么促使您參與PouchDB的? (What motivated you to get involved with PouchDB?)
Around 2012, I was working for an NGO in Geneva. We were building a web app for a client that was using CouchDB. Later on, I started playing with CouchDB for a side project. Through that I found PouchDB, which could sync data between CouchDB on the server and IndexedDB in the browser. I thought it was amazing.
2012年左右,我在日內(nèi)瓦的一個(gè)非政府組織工作。 我們正在為使用CouchDB的客戶(hù)端構(gòu)建一個(gè)Web應(yīng)用程序。 后來(lái),我開(kāi)始與CouchDB一起進(jìn)行輔助項(xiàng)目。 通過(guò)該操作,我找到了PouchDB ,它可以在服務(wù)器上的CouchDB和瀏覽器中的IdexedDB之間同步數(shù)據(jù)。 我認(rèn)為這太神奇了。
While working on that project, I noticed a few bugs in PouchDB. I realized I knew enough Android and enough JavaScript to solve the bugs. Eventually, I ended up fixing more bugs, and contributing to the project more frequently. In early 2014 I become one of the main contributors, and still am today.
在進(jìn)行該項(xiàng)目時(shí),我注意到PouchDB中的一些錯(cuò)誤。 我意識(shí)到我知道足夠的Android和足夠JavaScript來(lái)解決這些錯(cuò)誤。 最終,我最終修復(fù)了更多的錯(cuò)誤,并更加頻繁地為該項(xiàng)目做出了貢獻(xiàn)。 2014年初,我成為主要貢獻(xiàn)者之一 ,直到今天仍然如此。
The story of how PouchDB got started is pretty interesting. Back in 2010, Mikeal Rogers did this one-off experiment called IDBCouch, which only worked in Firefox Nightly because IndexedDB was so new at the time. Max Ogden later renamed it to PouchDB, when he was bicycle shopping in San Francisco and thought up the name “Portable Couch.” Then Dale Harvey, who works at Mozilla, picked up the project and did an enormous amount of work to get it running well in Firefox and Chrome.
關(guān)于PouchDB如何開(kāi)始的故事非常有趣。 早在2010年, Mikeal Rogers進(jìn)行了一次名為IDBCouch的一次性實(shí)驗(yàn),該實(shí)驗(yàn)僅在Firefox Nightly中有效,因?yàn)镮ndexedDB當(dāng)時(shí)還很新。 馬克斯·奧格登(Max Ogden)后來(lái)在舊金山騎自行車(chē)購(gòu)物時(shí)將其重命名為PouchDB,并想到了“ 便攜式沙發(fā) ”的名稱(chēng)。 然后,在Mozilla工作的Dale Harvey選擇了該項(xiàng)目,并進(jìn)行了大量工作以使其在Firefox和Chrome中正常運(yùn)行。
When I came to the project in late 2013, I wanted PouchDB to work in all the browsers, like jQuery but for databases. I thought people should be able to drop it in and it should “just work” on old versions of Android, IE, and Safari. A lot of my early work was on cross-browser compatibility, which really helped PouchDB become more popular.
當(dāng)我在2013年底參加該項(xiàng)目時(shí),我希望PouchDB在所有瀏覽器(如jQuery)中都能使用,但適用于數(shù)據(jù)庫(kù)。 我認(rèn)為人們應(yīng)該可以使用它,并且應(yīng)該可以在舊版本的Android,IE和Safari上“正常工作”。 我的很多早期工作是關(guān)于跨瀏覽器兼容性的,這確實(shí)幫助了PouchDB變得越來(lái)越流行。
PouchDB is a good example of what the IndexedDB authors originally intended when they wrote the spec. They wanted people to build libraries on top of it, in the spirit of the extensible web manifesto. The original spec author, Nikunj Mehta, even wondered if someone would write a “JavaScript CouchDB.” Today, there are a lot of interesting libraries built on top of IndexedDB, including PouchDB, localForage, Dexie.js and Lovefield, which provide a more developer-friendly experience.
PouchDB是IndexedDB作者編寫(xiě)規(guī)范時(shí)最初意圖的一個(gè)很好的例子。 他們希望人們本著可擴(kuò)展的Web宣言的精神在其上構(gòu)建庫(kù)。 最初的規(guī)范作者Nikunj Mehta甚至想知道是否有人會(huì)編寫(xiě)“ JavaScript CouchDB”。 今天,有很多建立在IndexedDB的頂部有趣的庫(kù),包括PouchDB, localForage , Dexie.js和Lovefield ,它提供了更開(kāi)發(fā)者友好的體驗(yàn)。
PouchDB是否從大型企業(yè)和社區(qū)尋求資金? (Did PouchDB seek funding from large corporations and the community?)
“I’ve always had this somewhat idealistic notion that PouchDB should be a passion project that’s not corrupted by money. I don’t want to be swayed by one organization or another to push it in a particular direction. It ought to be whatever’s best for users.”“我一直抱有某種理想主義的觀念,即PouchDB應(yīng)該是一個(gè)不受金錢(qián)破壞的熱情項(xiàng)目。 我不想被一個(gè)組織或另一個(gè)組織所吸引,將其推向特定的方向。 它應(yīng)該是最適合用戶(hù)的。”We did try to seek funding pretty early on, around 2013. Dale set up a bounty system where each GitHub issue might have a notice saying, “Hey, if you solve this issue, there’s a bounty.” There were a few issues with that.
我們確實(shí)嘗試在2013年左右早些時(shí)候?qū)で筚Y金。Dale建立了一個(gè)賞金系統(tǒng),每個(gè)GitHub問(wèn)題可能都會(huì)有一個(gè)通知,說(shuō):“嘿,如果您解決這個(gè)問(wèn)題,就會(huì)有賞金。” 有一些問(wèn)題。
Random people could come in and submit a PR to fix one of the bounty issues. I recall one issue where the PR didn’t quite fix it, but it was halfway there, so I went in and fixed the other half. At that point, it was unclear who the bounty should go to. Should it be split in half? In the end, the person who offered the bounty didn’t even end up paying it. So this system didn’t work too well, and we scrapped it.
隨機(jī)的人可以進(jìn)來(lái)并提交PR來(lái)解決其中一個(gè)賞金問(wèn)題。 我記得一個(gè)問(wèn)題,PR并沒(méi)有完全解決它,但是它已經(jīng)解決了一半,所以我進(jìn)了一步,修復(fù)了另一半。 在那時(shí),尚不清楚賞金應(yīng)該歸誰(shuí)。 應(yīng)該將它分成兩半嗎? 最后,提供賞金的人甚至沒(méi)有付清這筆錢(qián)。 因此,該系統(tǒng)無(wú)法正常運(yùn)行,因此我們將其報(bào)廢。
Today, PouchDB has grown to over 200 contributors, but essentially Dale is the BDFL and I’m the lieutenant. Recently we started the funding discussionagain, but we need to set up a formal governance model first. This is especially important to enterprises. IBM, which is heavily invested in CouchDB through Cloudant, wants to be able to tell their customers that CouchDB and PouchDB are rock-solid solutions to their problems. However, while CouchDB is under the Apache Foundation and has a very clear governance model, PouchDB doesn’t. So some enterprise clients might be a little concerned about that.
如今,PouchDB的貢獻(xiàn)者已增長(zhǎng)到200多個(gè) ,但本質(zhì)上Dale是BDFL,而我是中尉。 最近,我們?cè)俅伍_(kāi)始了資金討論 ,但我們需要首先建立一個(gè)正式的治理模型。 這對(duì)企業(yè)尤其重要。 通過(guò)Cloudant對(duì)CouchDB進(jìn)行了大量投資的IBM希望能夠告訴客戶(hù)CouchDB和PouchDB是解決他們問(wèn)題的堅(jiān)如磐石的解決方案。 但是,盡管CouchDB在Apache Foundation之下,并??且具有非常清晰的治理模型,但PouchDB卻沒(méi)有。 因此,某些企業(yè)客戶(hù)可能對(duì)此有所擔(dān)心。
I’ve always had this somewhat idealistic notion that PouchDB should be a passion project that’s not corrupted by money. I don’t want to be swayed by one organization or another to push it in a particular direction. It ought to be whatever’s best for users. We’re at this point in the maturity of the project, though, where we need to start asking the hard questions. For instance, we want to figure out how to raise and distribute money so we can give it out fairly to contributors. We’re exploring options right now, but we haven’t committed to anything yet.
我一直有這樣一種理想主義的觀念,即PouchDB應(yīng)該是一個(gè)不受金錢(qián)破壞的熱情項(xiàng)目。 我不想被一個(gè)組織或另一個(gè)組織所吸引,將其推向特定的方向。 它應(yīng)該是最適合用戶(hù)的。 不過(guò),我們正處于項(xiàng)目的成熟階段,我們需要開(kāi)始提出棘手的問(wèn)題。 例如,我們想弄清楚如何籌集和分配資金,以便我們公平地將其分配給捐助者。 我們目前正在探索各種選擇,但我們尚未做出任何承諾。
關(guān)于OSS可持續(xù)性,您從PouchDB項(xiàng)目中學(xué)到了什么? (What have you learned from the PouchDB project when it comes to OSS sustainability?)
“That’s why I think it’s important to remember what it’s like to be a beginner. When you’re just starting out, even talking to an open-source maintainer can be intimidating.”“這就是為什么我認(rèn)為記住初學(xué)者的感覺(jué)很重要的原因。 當(dāng)您剛剛起步時(shí),甚至與開(kāi)源維護(hù)者交談也可能令人生畏?!?PouchDB was my first big open-source project. I have to hand it to Dale; he was my mentor from the start. He taught me all the fundamentals of how to interact in an open-source project.
PouchDB是我的第一個(gè)大型開(kāi)源項(xiàng)目。 我必須把它交給戴爾; 從一開(kāi)始他就是我的導(dǎo)師 他教了我有關(guān)如何在開(kāi)源項(xiàng)目中進(jìn)行交互的所有基礎(chǔ)知識(shí)。
In the beginning, even just talking to Dale Harvey on IRC was intimidating. He was the kind of person who gives talks at conferences; people respected him. I was just some rando on the Internet. But Dale is always very patient with new contributors. He responds to everyone’s questions and issues. Even if he thinks something’s a bad idea, he’ll tell them gently. Slowly, I realized Dale is just a normal human being, and he’s happy to have people involved in the project.
剛開(kāi)始時(shí),即使只是與IRC的Dale Harvey交談也是令人生畏的。 他是那種在會(huì)議上發(fā)表演講的人。 人們尊重他。 我只是互聯(lián)網(wǎng)上的一名蘭多。 但是Dale對(duì)新的貢獻(xiàn)者總是很耐心。 他回答每個(gè)人的問(wèn)題。 即使他認(rèn)為某事是一個(gè)壞主意,他也會(huì)輕柔地告訴他們。 慢慢地,我意識(shí)到Dale只是一個(gè)普通的人,他很高興有人參與該項(xiàng)目。
That’s why I think it’s important to remember what it’s like to be a beginner. When you’re just starting out, even talking to an open-source maintainer can be intimidating. I learned from Dale to be a thoughtful maintainer and to always encourage people to contribute.
這就是為什么我認(rèn)為記住初學(xué)者的感覺(jué)很重要的原因。 當(dāng)您剛?cè)腴T(mén)時(shí),甚至與開(kāi)源維護(hù)者交談也可能令人生畏。 我從戴爾(Dale)中學(xué)到了要成為一個(gè)周到的維護(hù)者,并始終鼓勵(lì)人們做出貢獻(xiàn)。
Today, PouchDB is very mature, and it requires a huge amount of knowledge to get started, which is challenging to new contributors. One thing I’d like to fix is to make it a little bit easier for newcomers to get on board. That’s something I think is missing right now.
今天,PouchDB已經(jīng)非常成熟,它需要大量的知識(shí)才能入門(mén),這對(duì)新的貢獻(xiàn)者來(lái)說(shuō)是挑戰(zhàn)。 我想解決的一件事是使新來(lái)者更容易加入。 我認(rèn)為這是現(xiàn)在缺少的東西。
自2010年以來(lái),我們一直在談?wù)摗懊摍C(jī)優(yōu)先”。您認(rèn)為我們終于可以為此做好準(zhǔn)備了嗎? 今天的主要挑戰(zhàn)是什么? (“Offline first” is something we have been talking about since 2010. Do you think we are finally ready for it? What are the main challenges with it today?)
Offline is really difficult. It’s one of those things that’s even missing from a university computer science education. What folks don’t realize is, when you’re building an offline-first application, you are essentially building a distributed system: client and server. Just by storing data on those two nodes, you have all the theoretical problems of the CAP theorem: consistency, availability, and partition tolerance — pick two.
離線(xiàn)真的很困難。 這是大學(xué)計(jì)算機(jī)科學(xué)教育中甚至還缺少的東西之一。 人們沒(méi)有意識(shí)到的是,當(dāng)您構(gòu)建脫機(jī)優(yōu)先應(yīng)用程序時(shí),實(shí)際上是在構(gòu)建分布式系統(tǒng):客戶(hù)端和服務(wù)器。 僅通過(guò)將數(shù)據(jù)存儲(chǔ)在這兩個(gè)節(jié)點(diǎn)上,您便具有CAP定理的所有理論問(wèn)題:一致性,可用性和分區(qū)容限-選擇兩個(gè)。
So if you’re building that kind of system, but don’t realize it going in, you’ll probably end up just hacking something together. You may think you got 100% of the way there, but you really only got 90%, and the remaining 10% may take years to finish. It’s taken years to fix all the edge cases in PouchDB.
因此,如果您正在構(gòu)建這種系統(tǒng),但是不知道它會(huì)進(jìn)入其中,那么您可能最終只會(huì)一起入侵某些東西。 您可能會(huì)認(rèn)為自己達(dá)到了目標(biāo)的100%,但實(shí)際上只有90%,而剩下的10%可能要花費(fèi)數(shù)年才能完成。 在PouchDB中修復(fù)所有極端情況花了幾年的時(shí)間。
One of the things we’re trying to do with PouchDB is to raise awareness and help people think about the inherent issues of offline-first architecture. PouchDB has a built-in concept of conflict management, because CouchDB thought about those problems from the very beginning. It’s designed with the multi-version concurrency control model, which answers the question of what happens when the client and server get out of sync.
我們正在嘗試使用PouchDB進(jìn)行的一件事是提高認(rèn)識(shí)并幫助人們思考脫機(jī)優(yōu)先架構(gòu)的內(nèi)在問(wèn)題。 PouchDB具有內(nèi)置的沖突管理概念,因?yàn)镃ouchDB從一開(kāi)始就考慮到這些問(wèn)題。 它是使用多版本并發(fā)控制模型設(shè)計(jì)的,該模型回答了當(dāng)客戶(hù)端和服務(wù)器不同步時(shí)會(huì)發(fā)生什么的問(wèn)題。
User experience is another big problem that hasn’t really been solved yet in offline-first. I think that new models like Progressive Web Applications will force us to start to think about how to communicate this to users. There’s a great post from Jesse Beach where she talks about how to effectively communicate offline states, and at Offline Camp we discussed some of these techniques, like switching the UI to grayscale when the app goes offline. It’s not as negative or jarring as an alert, but it’s a subtle indication that you’re offline.
用戶(hù)體驗(yàn)是另一個(gè)離線(xiàn)優(yōu)先解決的大問(wèn)題。 我認(rèn)為諸如漸進(jìn)式Web應(yīng)用程序之類(lèi)的新模型將迫使我們開(kāi)始考慮如何將此與用戶(hù)進(jìn)行交流。 杰西海灘 ( Jesse Beach)上有一篇很棒的文章 ,她談到如何有效地傳達(dá)離線(xiàn)狀態(tài),在離線(xiàn)營(yíng)地中,我們討論了其中一些技術(shù),例如當(dāng)應(yīng)用程序離線(xiàn)時(shí)將UI切換為灰度。 它不像警報(bào)那樣消極或刺耳,但這是您處于離線(xiàn)狀態(tài)的微妙指示。
There’s been a great deal of progress on offline first, but it’s still definitely an unsolved problem.
首先,離線(xiàn)方面已經(jīng)取得了很大的進(jìn)步,但這絕對(duì)是一個(gè)尚未解決的問(wèn)題。
是什么讓您決定加入Microsoft Edge團(tuán)隊(duì)? 從小型初創(chuàng)公司到大型組織,您對(duì)前六個(gè)月的印象如何? (What made you decide to join the Microsoft Edge team? What is your impression of the first six months, going from a small startup to a large organization?)
“But there’s a general feeling across the company now that when we’re transparent and seeking feedback from the community, it works out well for us.”“但是,現(xiàn)在,整個(gè)公司普遍感到,當(dāng)我們保持透明并尋求社區(qū)的反饋時(shí),這對(duì)我們來(lái)說(shuō)很有效。”I came to Microsoft Edge because I wanted to help make the web platform better. I thought it would be a good opportunity to build out a lot of the standards that I’m passionate about. For instance, we’re in the process of building out Service Workers and Progressive Web Apps, as well as improvements to IndexedDB. I wanted to be on the ground floor to see those things happen.
我之所以加入Microsoft Edge,是因?yàn)槲蚁霂椭纳芖eb平臺(tái)。 我認(rèn)為這是一個(gè)很好的機(jī)會(huì)來(lái)建立我熱衷的許多標(biāo)準(zhǔn)。 例如,我們正在構(gòu)建Service Worker和Progressive Web Apps以及對(duì)IndexedDB的改進(jìn)。 我想在底層看到這些事情的發(fā)生。
Microsoft is fascinating to watch because it’s a company in transition. It’s moving from being fairly closed to being a lot more open. Certain teams have embraced this openness more than others, and even certain people within the same team. But there’s a general feeling across the company now that when we’re transparent and seeking feedback from the community, it works out well for us.
微軟非常著迷,因?yàn)樗且患肄D(zhuǎn)型中的公司。 它已經(jīng)從相當(dāng)封閉的狀態(tài)轉(zhuǎn)變?yōu)楦娱_(kāi)放的狀態(tài)。 某些團(tuán)隊(duì)比其他團(tuán)隊(duì)甚至在同一團(tuán)隊(duì)中的某些人對(duì)開(kāi)放性的接受程度更高。 但是,現(xiàn)在,整個(gè)公司都有一種普遍的感覺(jué),那就是當(dāng)我們保持透明并征詢(xún)社區(qū)的反饋時(shí),對(duì)我們來(lái)說(shuō)效果很好。
I am still actively involved in the PouchDB project, but I tend to keep my work at Microsoft and PouchDB separate. I’ll triage GitHub issues on the way to work and then do some programming for PouchDB in the evenings or weekends. But I find these two blending together more and more, in a positive way. For example, I might find a bug in IndexedDB on Edge while I’m working on PouchDB issues.
我仍然積極參與PouchDB項(xiàng)目,但我傾向于將我在Microsoft和PouchDB的工作分開(kāi)。 我將對(duì)GitHub問(wèn)題進(jìn)行分類(lèi),然后在晚上或周末為PouchDB進(jìn)行一些編程。 但是我發(fā)現(xiàn)這兩種方式越來(lái)越以積極的方式融合在一起。 例如,當(dāng)我處理PouchDB問(wèn)題時(shí),可能會(huì)在Edge上的IndexedDB中發(fā)現(xiàn)一個(gè)錯(cuò)誤。
帶領(lǐng)我們完成在Microsoft Edge擔(dān)任績(jī)效PM的一天。 (Walk us through a day in the life of being a performance PM at Microsoft Edge.)
I’m on the performance team, so most of my job centers around identifying performance problems in the browser and communicating those problems to the web developers and the browser team.
我是性能團(tuán)隊(duì)的一員,所以我的大部分工作都圍繞著識(shí)別瀏覽器中的性能問(wèn)題并將這些問(wèn)題傳達(dá)給Web開(kāi)發(fā)人員和瀏覽器團(tuán)隊(duì)。
One project I’ve been working on is “Performance Clubs,” where we invite web teams to come in and talk about their site’s performance. Usually these are Microsoft sites like Outlook.com and MSN, but sometimes they’re also external partners. When they come in, we do a deep performance analysis of the website using the same tools that we use to build the browser itself. Then we give performance advice to them so they can go back and make their websites faster. I also file issues reported by the site authors and write test cases.
我一直在研究的一個(gè)項(xiàng)目是“ Performance Clubs”,我們邀請(qǐng)網(wǎng)絡(luò)團(tuán)隊(duì)加入進(jìn)來(lái),討論他們網(wǎng)站的性能。 通常,這些網(wǎng)站是Microsoft網(wǎng)站,例如Outlook.com和MSN,但有時(shí)它們也是外部合作伙伴。 當(dāng)它們進(jìn)入時(shí),我們將使用與構(gòu)建瀏覽器本身相同的工具對(duì)網(wǎng)站進(jìn)行深入的性能分析。 然后,我們向他們提供性能建議,以便他們可以回頭并使其網(wǎng)站更快。 我還歸檔了站點(diǎn)作者報(bào)告的問(wèn)題并編寫(xiě)了測(cè)試用例。
The performance clubs are private for now. Not everyone wants to take the aspects of their websites that they’re not proud of and put them out on public display; it’s like airing your dirty laundry. There has been some discussion about maybe anonymizing and publishing the data, but it’s incredibly difficult to do without revealing the site that you’re analyzing. There’s been some recent controversy about public performance audits; it’s not always welcome.
表演俱樂(lè)部目前是私人的。 并非每個(gè)人都希望將自己不滿(mǎn)意的網(wǎng)站內(nèi)容放到公眾面前展示; 就像在晾臟衣服一樣。 已經(jīng)進(jìn)行了一些討論,可能涉及匿名化和發(fā)布數(shù)據(jù),但是如果不透露正在分析的站點(diǎn),很難做到。 最近有一些關(guān)于公共績(jī)效審計(jì)的爭(zhēng)議; 它并不總是受歡迎。
鑒于最近引起了熱烈的討論,瀏覽器供應(yīng)商和框架作者如何在Web性能上進(jìn)行更緊密的協(xié)作? (How can browser vendors and framework authors collaborate more closely on web performance, given that it has been a heated discussion recently?)
“…the people who can provide the most value here are JavaScript library and framework authors. They’re in a position where they can be impartial and compare performance across browsers, which is extremely valuable to browser vendors.”“……在此能提供最大價(jià)值的人是JavaScript庫(kù)和框架作者。 他們處于公正的位置,可以在不同瀏覽器之間比較性能,這對(duì)瀏覽器供應(yīng)商來(lái)說(shuō)非常有價(jià)值?!?I think it’s important for web developers to understand why performance is such a touchy subject. Browsers don’t compete on API features — we stopped doing that when we agreed to implement web standards — but browsers do compete on performance. Speed is a huge selling point for a browser. Every browser claims to be the fastest, kind of like how McDonald’s and Burger King each claim to have the best burgers. Obviously they can’t both be right.
我認(rèn)為對(duì)于Web開(kāi)發(fā)人員來(lái)說(shuō),重要的是要理解為什么性能如此棘手。 瀏覽器在API功能上沒(méi)有競(jìng)爭(zhēng)-當(dāng)我們同意實(shí)施Web標(biāo)準(zhǔn)時(shí),我們就停止了這樣做-但是瀏覽器在性能上確實(shí)競(jìng)爭(zhēng)。 速度是瀏覽器的巨大賣(mài)點(diǎn)。 每個(gè)瀏覽器都聲稱(chēng)是最快的,就像麥當(dāng)勞和漢堡王各自聲稱(chēng)擁有最好的漢堡一樣。 顯然他們不可能兩者都是正確的。
In general, browser vendors only speak publicly about what they do well. If you talk privately with someone who works on a browser team, they can easily tell you 50 things the browser does well and 50 things it doesn’t do well; they know them by heart. But publicly we tend to only talk about the stuff we do well, because there are business implications there.
通常,瀏覽器供應(yīng)商只會(huì)公開(kāi)談?wù)撍麄兊膬?yōu)勢(shì)。 如果您與瀏覽器團(tuán)隊(duì)的成員私下交談,他們可以輕松地告訴您瀏覽器運(yùn)行良好的50件事和運(yùn)行不正常的50件事。 他們很了解他們。 但是在公開(kāi)場(chǎng)合,我們傾向于只談?wù)撐覀冏龅煤玫氖虑?#xff0c;因?yàn)槟抢锎嬖跇I(yè)務(wù)隱患。
For instance, when the WebKit team comes out with the Speedometerbenchmark or the MotionMark benchmark, it’s no surprise that Safari wins. Similarly, when Microsoft writes a blog post about how we have a great JavaScript Engine, we tend to talk about Octane and JetStream. Surprise, surprise: we win on those benchmarks.
例如,當(dāng)WebKit團(tuán)隊(duì)推出Speedometer基準(zhǔn)或MotionMark基準(zhǔn)時(shí),Safari獲勝就不足為奇了。 同樣,當(dāng)Microsoft撰寫(xiě)有關(guān)如何擁有出色JavaScript引擎的博客文章時(shí),我們傾向于談?wù)揙ctane和JetStream 。 驚喜,驚喜:我們?cè)谀切┗鶞?zhǔn)上取勝。
I think the people who can provide the most value here are JavaScript library and framework authors. They’re in a position where they can be impartial and compare performance across browsers, which is extremely valuable to browser vendors. Unfortunately I feel many of them could be doing better on this.
我認(rèn)為可以在此提供最大價(jià)值的人是JavaScript庫(kù)和框架作者。 他們處于公正的位置,可以在不同瀏覽器之間比較性能,這對(duì)瀏覽器供應(yīng)商來(lái)說(shuō)非常有價(jià)值。 不幸的是,我覺(jué)得他們中的許多人可能會(huì)做得更好。
There’s a lot of interest in web performance today, and you see many JavaScript frameworks competing with one another on performance — React, Inferno, Preact, Vue, Svelte, etc. But when you look at their benchmarks, they’re often only testing in Chrome or maybe Mobile Safari. Sometimes they don’t even specify which browser they test on, so you just have to assume it’s Chrome.
有很多的當(dāng)今網(wǎng)絡(luò)性能的興趣,你可以看到很多JavaScript框架與性能相互競(jìng)爭(zhēng)- 陣營(yíng) , 地獄 , Preact , Vue公司 , Card.svelte ,等等。但是當(dāng)你看到他們的基準(zhǔn),他們往往只在測(cè)試Chrome或也許移動(dòng)Safari瀏覽器。 有時(shí)他們甚至沒(méi)有指定要測(cè)試的瀏覽器,因此您只需要假設(shè)它是Chrome。
One framework that’s bucking this trend, which I really love, is Ember. They’ve created their own benchmark, the Ember Benchmark, and they sometimes go on Twitter and maybe raise some eyebrows by pointing out that Chrome doesn’t do as well on their benchmarks as Safari.
我真正喜歡的一個(gè)逆轉(zhuǎn)這種趨勢(shì)的框架是Ember 。 他們創(chuàng)建了自己的基準(zhǔn)測(cè)試Ember Benchmark ,有時(shí)他們會(huì)在Twitter上露面 ,并指出Chrome與Safari相比在基準(zhǔn)測(cè)試中表現(xiàn)不佳,因此引起了一些關(guān)注。
This is great feedback for browser vendors. Even if we don’t send public signals about how we feel about the benchmark, we may use it internally and work hard to make our browser better. I would love to see more cross-browser benchmarking and more recognition from JavaScript framework authors that it’s valuable to test across browsers. That’s the big thing I see missing right now.
對(duì)于瀏覽器供應(yīng)商來(lái)說(shuō),這是一個(gè)很好的反饋。 即使我們不向公眾發(fā)送有關(guān)基準(zhǔn)測(cè)試感覺(jué)的信號(hào),我們也可能會(huì)在內(nèi)部使用它并努力使瀏覽器變得更好。 我希望看到更多的跨瀏覽器基準(zhǔn)測(cè)試,以及JavaScript框架作者的更多認(rèn)可,這對(duì)于跨瀏覽器進(jìn)行測(cè)試非常有價(jià)值。 這是我現(xiàn)在錯(cuò)過(guò)的大事情。
Edge has pretty good browser market share; it’s improving anyway. I don’t think it’s safe to just ignore browsers because they have too low of a market share, especially because a lot of web developers have a very skewed perception of what the market share is. Windows is the dominant operating system in the world; it’s used by about 90% of all desktop users. And Android is the most popular mobile operating system on the planet by far.
Edge擁有相當(dāng)不錯(cuò)的瀏覽器市場(chǎng)份額; 無(wú)論如何它正在改善。 我認(rèn)為僅僅忽略瀏覽器是不安全的,因?yàn)樗鼈兊氖袌?chǎng)份額太低,尤其是因?yàn)樵S多Web開(kāi)發(fā)人員對(duì)市場(chǎng)份額的看法非常不正確。 Windows是世界上主要的操作系統(tǒng)。 大約90%的桌面用戶(hù)都在使用它 。 到目前為止,Android是全球最受歡迎的移動(dòng)操作系統(tǒng) 。
If you just look at web developer conferences, though, you could be forgiven for thinking that the world is purely Mac, or that everybody is using Chrome, or that most people are carrying an iPhone. But the reality is far different. I would say web developers are doing a big disservice to their users if they live in that bubble and assume that everyone else is living in that bubble too.
但是,如果只看Web開(kāi)發(fā)者大會(huì),您可能會(huì)認(rèn)為世界純粹是Mac,或者每個(gè)人都在使用Chrome,或者大多數(shù)人都在使用iPhone,這是可以原諒的。 但是現(xiàn)實(shí)卻大不相同。 我要說(shuō)的是,如果Web開(kāi)發(fā)人員生活在該泡沫中并假設(shè)其他所有人也生活在該泡沫中,則會(huì)給用戶(hù)帶來(lái)極大的傷害。
在編程之外您還有哪些其他愛(ài)好或興趣? (What other hobbies or interests do you have outside of programming?)
I play a little guitar and sing a little, mostly for myself. I have a YouTube channel where I post some of my performances. I don’t perform publicly.
我彈一點(diǎn)吉他,唱歌一點(diǎn),主要是為了我自己。 我有一個(gè)YouTube頻道,我在那里發(fā)布一些表演 。 我不公開(kāi)表演。
我對(duì)電子競(jìng)技真的很感興趣。 我花了大量時(shí)間觀看Super Smash Brothers錦標(biāo)賽或觀看視頻游戲的運(yùn)行速度。 速度的運(yùn)行實(shí)際上使我想起了很多瀏覽器性能。 您試圖將其優(yōu)化為盡可能快的速度,有時(shí)您會(huì)作弊很多,例如使角色在墻壁上出現(xiàn)毛刺。 有時(shí)我發(fā)現(xiàn),一個(gè)經(jīng)過(guò)良好調(diào)整的網(wǎng)站就像是一個(gè)經(jīng)過(guò)調(diào)整的速度運(yùn)行-您作弊要取得成功。 看到這些相似之處真是有趣。 (I’m really interested in e-sports. I spend a lot of time watching Super Smash Brothers tournaments or watching video game speed runs. Speed runs actually remind me a lot of browser performance. You’re trying to optimize this thing to go as fast as possible, and sometimes you’re cheating quite a bit, such as making your character glitch through a wall. Sometimes I find that a well-tuned website is like a well-tuned speed run — you cheat a bit to get ahead. It’s kind of funny to see the parallels.)
您的編程英雄是誰(shuí)? (Who are your programming heroes?)
I really admire D. Richard Hipp, the creator of SQLite, which is arguably the most popular database on the planet. SQLite is a rigorous piece of software with 745 times as much test code as code. You could send that thing to the moon.
我真的很佩服SQLite的創(chuàng)建者D. Richard Hipp ,它可以說(shuō)是全球最受歡迎的數(shù)據(jù)庫(kù)。 SQLite是一款嚴(yán)格的軟件,其測(cè)試代碼是代碼的745倍。 你可以把那東西送上月球。
Richard Hipp is also something of a programming Renaissance Man; he’s implemented lots of interesting things. He wrote a whole version control system called Fossil. He wasn’t happy with Git, so he wrote an entire version control system, and that’s the version control system used for SQLite.
理查德·希普(Richard Hipp)還是一位編程復(fù)興者。 他實(shí)現(xiàn)了很多有趣的東西。 他編寫(xiě)了一個(gè)稱(chēng)為Fossil的完整版本控制系統(tǒng)。 他對(duì)Git不滿(mǎn)意,因此他編寫(xiě)了一個(gè)完整的版本控制系統(tǒng),這就是用于SQLite的版本控制系統(tǒng)。
If you look at SQLite source code, you’ll also find my favorite open source license of all time, which says “In place of a license, I offer you this prayer.” It’s really beautiful, like a poem.
如果您查看SQLite源代碼,您還將找到我最喜歡的開(kāi)源許可證,上面寫(xiě)著:“代替許可證,我為您祈禱?!?真的很美,就像一首詩(shī)。
And yet despite his success, Hipp is also incredibly humble. He never boasts in any interview. I find it inspiring to see someone who is so humble, and yet so proficient in the software world.
盡管他取得了成功,但希普還是非常謙虛。 他從來(lái)沒(méi)有自夸過(guò)任何采訪(fǎng)。 我發(fā)現(xiàn)看到一個(gè)謙虛但精通軟件世界的人鼓舞人心。
This project is made possible with sponsorships from frontendmasters.com, egghead.io, Microsoft Edge and Google Developers.
來(lái)自frontendmasters.com , egghead.io , Microsoft Edge和Google Developers的贊助使該項(xiàng)目成為可能。
Donate to support this project.
捐款支持該項(xiàng)目 。
To suggest a maker you’d like to hear from, please fill out this form.
要建議您想聽(tīng)聽(tīng)的制造商,請(qǐng)?zhí)顚?xiě)此表格 。
You can also send feedback to betweenthewires on Twitter.
您還可以發(fā)送反饋betweenthewires在Twitter上。
翻譯自: https://www.freecodecamp.org/news/between-the-wires-an-interview-with-microsoft-edge-performance-pm-nolan-lawson-ca3240dec2eb/
總結(jié)
以上是生活随笔為你收集整理的电线之间:采访Microsoft Edge性能PM Nolan Lawson的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 梦到女同学是什么意思
- 下一篇: 梦到别人砍树枝是什么意思