{"id":20956787,"url":"https://github.com/markbrown4/presentation-web-workers","last_synced_at":"2026-01-02T03:20:12.355Z","repository":{"id":147916747,"uuid":"51351423","full_name":"markbrown4/presentation-web-workers","owner":"markbrown4","description":null,"archived":false,"fork":false,"pushed_at":"2016-02-10T06:01:26.000Z","size":4925,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T23:38:55.439Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markbrown4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-09T06:55:18.000Z","updated_at":"2016-02-09T06:56:11.000Z","dependencies_parsed_at":"2023-04-30T02:17:07.719Z","dependency_job_id":null,"html_url":"https://github.com/markbrown4/presentation-web-workers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fpresentation-web-workers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fpresentation-web-workers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fpresentation-web-workers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbrown4%2Fpresentation-web-workers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markbrown4","download_url":"https://codeload.github.com/markbrown4/presentation-web-workers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243352038,"owners_count":20276916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T01:27:56.015Z","updated_at":"2026-01-02T03:20:12.323Z","avatar_url":"https://github.com/markbrown4.png","language":"HTML","readme":"# Working Off the Main Thread\n\nA talk I gave at MelbJS on Feb 10, 2016.\nInspired by [@henrikjoreteg](https://twitter.com/henrikjoreteg)'s [feather-app](https://github.com/HenrikJoreteg/feather-app)\n\n--\n\nThis talk came out of watching Henrik Joreteg's pocket-sized JS presentation.  I highly recommend watching it.\n\nBasically, he talked about how we should approach Mobile Web development and I'm going to give a quick recap and then look at a project he made called feather-app.\n\nNumber 1, actually test and develop on mobile devices.  Not just your iPhone 6s but your low-end Android phones too.\n\nDon't do this, send HTML from the server.\nThis doesn't have to be all or nothing either, you don't need to make a completely universal application, just render something initially from the server.\n\nShip less code, he highlighted a few complex apps that achieved a lot without a huge amount of js.\nGoogle Plus was redesigned recently and they set a target of 60kb of JavaScript.\nSound slice is an interesting app where sheet music follows audio, it weighs in at 94kb.\nIt may be hard but it's not impossible.\n\nAnd we should use WebWorkers if we want to make fast web apps on mobile.\n\nHe was heavily inspired by Nolan Lawson's blog post detailing how he made pokedex.org, which uses ServiceWorker, IndexedDB and WebWorkers to make a progressive web app.\n\nNolan wrote \"Ask any iOS or Android developer how we make our apps so fast, and most likely you'll hear about two major strategies. Eliminate network calls, and use background threads.\"\nFor us that means using things like ServiceWorker, persistent data stores like localStorage or IndexedDB and WebWorkers.\n\nThe key take out for me is this: \"Anything unrelated to the UI should be offloaded to a background thread.\".\nThis is very different to how I viewed WebWorkers previously.  We should be treating the Main Thread in JavaScript as the UI thread, responding to events, updating the DOM - Everything else belongs in a background thread.\n\nfeather-app is a proof of concept with these ideas, you can try it out at feather.surge.sh\nIt doesn't do much, it's a simple counter app with two pages.\nIt has server rendered HTML and all app state, logic and DOM diffing happens inside a worker.\n\nLet's look at it.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbrown4%2Fpresentation-web-workers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkbrown4%2Fpresentation-web-workers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbrown4%2Fpresentation-web-workers/lists"}