Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Code Completion with Scale
Search
Abhishek Gahlot
October 03, 2017
Technology
16
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Code Completion with Scale
Abhishek Gahlot
October 03, 2017
More Decks by Abhishek Gahlot
See All by Abhishek Gahlot
Collaborative Editing and Scaling Web Based Editor
abhishekgahlot
0
12
Other Decks in Technology
See All in Technology
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
go-sqletch
moznion
0
140
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
730
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
110
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.1k
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
180
NDIでApple Vision Proにリアルタイム映像送信
jyouryuusui
0
120
パッチ更新でterraform initが落ちた日
grimoh
1
140
今さら理解するウェブフォントver.2026
takanorip
3
770
How to Design Configuration for Rails Applications
willnet
1
780
会社説明資料
persolserverworks
0
9.8k
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
300
Featured
See All Featured
A Soul's Torment
seathinner
8
3.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
Product Roadmaps are Hard
iamctodd
55
13k
HDC tutorial
michielstock
2
960
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Designing for Timeless Needs
cassininazir
1
530
Transcript
Better Autocomplete Code Completion Servers Abhishek Gahlot
Introduction Why Code Completion?
Why Code Completion? HackerRank uses Web Based Editors Ease of
use Switching between browser and editor Low latency for completion and docs
Previous Solutions • Eclim - Memory Issue and Overkill •
Tries - Not Comprehensive • Inbuilt keywords - Doesn’t do much
So…How does it work? Parser, Grammar, AST
Code Completion • Parser, Grammar, Abstract Syntax Tree (AST) •
Can Handle Errors, Partial code • Should be Fast Enough
Parser • Most parsers check inputs strictly and raise errors
• We need parsers that can tolerate errors and give some AST • Heuristics and general approaches to make it tolerant
Abstract Syntax Tree (AST)
What we’ve Done… Our Solution
Current Solution • Separate Daemon for all Languages • Modular
with interfaces • Ability to sync data and projects
Architecture
Language Support Python/Python3 C/C++/ObjectiveC Javascript Go Java Swift C# PHP
C/C++ • Clang • Ability to support both C and
C++
Python and Python 3 • No good option available. •
Javaparser ( https://github.com/javaparser/ javaparser) • Make java completion faster than available solution
Java • No good option available. • Javaparser ( https://github.com/javaparser/
javaparser) • Make java completion faster than available solution
Javascript, Go, and PHP • Javascript is done using Tern
( Acorn Parser ) • Go is done using Gocode • PHP uses language server.
Swift • Open Source • SourceKitten + Swift = Autocompletion
on Linux
Communication over Sockets • All daemons connect to node app
via Sockets • Backend is connected with web via websockets • File write time
Project Based Completion • Project Type Questions • Ability to
sync only tokens required to apply server side instead of sending whole files • Differential Synchronization
Further Optimization Latency | Packets | Geolocation
Network Latency • Packet Journey of autocompletion • Websocket for
connection
Geolocation Routing • Possible approaches done at Application Level •
Geographical latency for users
Comparing Consumption How the Current solution scales
Previous Consumption 25 m4.large EC2 Instances
Current Consumption 5 M4.large Instances
Python
Javascript
Alternate Ways • Antlr • Language server protocol
Questions?
Abhishek Gahlot
[email protected]
Thank You!