---
title: "Discussion on \"Why We Ditched a 30MB AI Model and Built a <2.5ms Canvas Snapper in TypeScript\" | Hashnode"
description: "Discussion on \"Why We Ditched a 30MB AI Model and Built a <2.5ms Canvas Snapper in TypeScript\". How we replaced a 30MB Segment-Anything model with 200 lines of classical TypeScript, achieving <2.5ms canvas element-snapping with zero dependencies."
url: "https://hashnode.com/posts/why-we-ditched-a-30mb-ai-model-and-built-a-2-5ms-canvas-snapper-in-typescript/6ae94c720badff8bbde4dc3e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why We Ditched a 30MB AI Model and Built a <2.5ms Canvas Snapper in TypeScript](https://tumio.hashnode.dev/why-we-ditched-a-30mb-ai-model-and-built-a-2-5ms-canvas-snapper-in-typescript?utm_source=hashnode&utm_medium=feed)

How we replaced a 30MB Segment-Anything model with 200 lines of classical TypeScript, achieving <2.5ms canvas element-snapping with zero dependencies.

Nov 3 · 4 min read · tumio.hashnode.dev  
Read the article

-   [#typescript-best-practices](https://hashnode.com/tag/typescript-best-practices)

## Written by

[xiangc](https://hashnode.com/@xiangc)

@xiangc

  
[View profile](https://hashnode.com/@xiangc)

Building FocusFlow & high-performance developer tools

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
