Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Story
How we grew from 0 to 3 million users
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

Adding Concurrency to our Web App - Go Lang Practical Programming Tutorial p.24

40.3K views
•
November 12, 2017
by
sentdex
YouTube video player
Adding Concurrency to our Web App - Go Lang Practical Programming Tutorial p.24

TL;DR

This tutorial demonstrates how to use Go routines and channels for concurrency in a web app to significantly reduce response time.

Transcript

what is going on everybody welcome to part 24 of our go language programming tutorial series in this tutorial what we're in an attempt to do is apply what we've been learning up to this point with channels and go routines concurrency in general to our web app to see if we can make it go a little quicker because right now it's pretty slow so what I'... Read More

Key Insights

  • ❤️‍🩹 The Google Chrome developer tool is effective in identifying performance bottlenecks in web applications, even for back-end processing.
  • 😀 The idle time in the web app can be significantly reduced by implementing concurrency using Go routines and channels.
  • 📰 The modification of the news aggregator handler involves separating the code into a new function, using channels to return values, and implementing synchronization with wait groups.
  • ⌛ By using Go routines and channels, the response time of the web app can be reduced by more than six times.
  • 🫰 Additional optimization can be achieved by loading the site map index information outside the news aggregator handler and implementing pagination to reduce the amount of data passed.
  • 😥 The tutorial points out that further improvements in web app performance may require front-end web development techniques.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is the purpose of channels and Go routines in this tutorial?

Channels and Go routines are used to introduce concurrency to the web app, allowing the execution of multiple tasks simultaneously, resulting in improved performance and reduced idle time.

Q: How is the idle time causing slow response time in the web app?

The web server is fetching information from various site maps every time the slash AGG page is visited, resulting in significant idle time as the browser waits for the response.

Q: What changes are made to the news aggregator handler to implement concurrency?

The code responsible for fetching the response, unmarshalling it into the news variable, and closing the response is moved to a separate function called "newsRoutine." This function is executed as a Go routine and returns the values through a channel.

Q: How is synchronization achieved in the modified news aggregator handler?

The sync package is imported, and a sync.WaitGroup is created to handle synchronization. The wait group is incremented before iterating over the news types received from the channel and is decremented after completion.

Summary & Key Takeaways

  • The tutorial aims to enhance the performance of a web app by applying the concepts of channels and Go routines.

  • By utilizing the Google Chrome developer tool, the idle time is identified as the bottleneck function, causing slow response time.

  • The tutorial explains the modification of the news aggregator handler to use Go routines, channels, and synchronization.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from sentdex 📚

Python: How to Graph the Chaikin Money Flow Trading Indicator in Matplotlib thumbnail
Python: How to Graph the Chaikin Money Flow Trading Indicator in Matplotlib
sentdex
How to Parse Twitter Data Using Python Effectively thumbnail
How to Parse Twitter Data Using Python Effectively
sentdex
Python: How to Program the Chaikin Money Flow Trading Indicator thumbnail
Python: How to Program the Chaikin Money Flow Trading Indicator
sentdex
Parsing XML - Go Lang Practical Programming Tutorial p.11 thumbnail
Parsing XML - Go Lang Practical Programming Tutorial p.11
sentdex
Python Generator Functions for massive Performance Improvements with Lists thumbnail
Python Generator Functions for massive Performance Improvements with Lists
sentdex
How to Train a Chatbot Using TensorFlow and Python thumbnail
How to Train a Chatbot Using TensorFlow and Python
sentdex

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots
  • Open Graph Checker

Company

  • About us
  • Our Story
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.