惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
aimingoo的专栏
aimingoo的专栏
D
Docker
N
Netflix TechBlog - Medium
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
美团技术团队
P
Proofpoint News Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
G
Google Developers Blog
腾讯CDC
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
Security Archives - TechRepublic
Security Archives - TechRepublic
Apple Machine Learning Research
Apple Machine Learning Research
L
LINUX DO - 最新话题
O
OpenAI News
博客园 - 司徒正美
Google Online Security Blog
Google Online Security Blog
H
Hacker News: Front Page
博客园 - 聂微东
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Project Zero
Project Zero
Vercel News
Vercel News
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Check Point Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Forbes - Security
Forbes - Security
www.infosecurity-magazine.com
www.infosecurity-magazine.com
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
S
Security @ Cisco Blogs
T
Tor Project blog
D
DataBreaches.Net
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Spread Privacy
Spread Privacy
W
WeLiveSecurity
V2EX - 技术
V2EX - 技术
Simon Willison's Weblog
Simon Willison's Weblog
AI
AI
Security Latest
Security Latest
S
Securelist

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
My API Responded in 4 ms, but Navigation Still Felt Slow
Awaliyatul Hikmah · 2026-06-20 · via DEV Community

I was debugging an internal project management application built with SvelteKit and a Rust API.

Locally, navigation felt almost instant.

On the VPS, opening the Tickets, Timeline, and OpenSpec docs pages felt noticeably slower. Clicking a ticket also took too long before the preview panel became useful.

My first assumption was infrastructure:

  • Maybe the VPS was underpowered.
  • Maybe PostgreSQL queries were slow.
  • Maybe the reverse proxy added latency.
  • Maybe SvelteKit SSR was taking too long.

The measurements pointed somewhere else.

The Baseline

I started with the feature list endpoint used by both Tickets and Timeline.

For a project with 52 tickets:

Metric Result
API response time ~4 ms
Response size 353,956 bytes
Number of tickets 52

The API was not slow.

But it was returning around 354 KB for a list of only 52 items.

The SvelteKit route payload showed the same pattern:

Route Data payload
Tickets 349,857 bytes
Timeline 354,731 bytes

This explained why local testing was misleading.

On localhost, transferring and parsing a few hundred kilobytes is easy to miss. Once the app runs behind a VPS, reverse proxy, TLS, and a real network connection, the payload becomes much more visible.

What Was Inside the Payload?

I broke down the feature response by field.

The descriptions alone accounted for:

296,177 bytes

That was more than 80% of the complete response.

The list endpoint was returning something similar to this for every ticket:

interface FeatureListItem {
  id: string;
  title: string;
  status: string;
  priority: string;
  storyPoints: number | null;
  dueDate: string | null;

  description: string | null;
  checkoutCommand: string | null;
  openSpecCommand: string | null;
}

The problem was not that these fields were useless.

They were useful on the ticket detail panel.

They were not useful when rendering the initial list.

Timeline was even more wasteful. It used ticket status, dates, dependencies, and assignees, but still downloaded every full Markdown description.

The Data Was Not a Toy List

This mattered because these pages were not rendering a simple table of titles.

In the production project I debugged, the Tickets data looked roughly like this:

Shape Count
Tickets 52
Completed tickets 52
Tickets with assignees 50
Tickets linked to OpenSpec docs 25
Scheduled tickets 41
Milestones 4
Dependency edges 28
Markdown description text ~299 KB
Largest single ticket description ~19 KB

So the ticket page was not only listing cards. It also had enough metadata to support filtering, preview panels, assignee display, milestones, dependencies, story points, and linked documentation.

The Timeline page reused the same ticket graph, but viewed it differently:

Shape Count
Scheduled items 41
Items with due dates 41
Items with start dates 35
Assignee lanes 6
Milestones 4
Dependency edges 28

Timeline needed dates, assignees, milestones, dependencies, and enough metadata for hover states and exports.

It did not need 299 KB of Markdown ticket descriptions.

OpenSpec docs had a different problem. The list endpoint was carrying document bodies and their task graph:

Shape Count / Size
Specs 26
Proposal content ~70 KB
Design content ~164 KB
Tasks markdown content ~97 KB
Spec files JSON ~158 KB
Linked task rows 576
Largest spec content bundle ~36 KB

That data is legitimate on a detail screen.

It is too much for opening the OpenSpec docs menu.

The issue was not that the application had complex data. The issue was that the first navigation step paid the cost of data that belonged to later interactions.

Why SvelteKit Made It Visible

The page loader was straightforward:

const features = await api.getFeatures(projectId);

return {
  features
};

Because features contained the full ticket objects, SvelteKit serialized the complete array into its route data response.

It did not matter that Timeline never rendered description.

The loader returned it, so it crossed the network.

This was the important distinction:

UI usage does not determine the payload. The loader return shape does.

The database query could finish in a few milliseconds while the browser still had to download, parse, deserialize, and hydrate hundreds of kilobytes.

The Root Cause

The feature list endpoint had slowly become a detail endpoint.

It started as a convenient shared API. Over time, more fields were added because different pages needed them.

Eventually, every list consumer received the union of all possible requirements.

That made the endpoint easy to reuse, but expensive to consume.

The same pattern also existed in the OpenSpec docs page. Its list request was carrying full document content even though the initial screen only needed document metadata.

The Fix

I separated summary data from detail data.

The list contract became:

interface FeatureListItem {
  id: string;
  title: string;
  status: string;
  priority: string;
  featureType: string;
  milestone: string | null;
  startDate: string | null;
  dueDate: string | null;
  storyPoints: number | null;
  dependencies: string[];
  labels: string[];
  assignee: CompactUser | null;
}

The detail contract extended it:

interface FeatureDetailItem extends FeatureListItem {
  description: string | null;
  checkoutCommand: string | null;
  openSpecCommand: string | null;
}

The API was split into two responsibilities:

GET /projects/:projectId/features
GET /projects/:projectId/features/:featureId

The first endpoint returns summaries.

The second returns one complete ticket.

The database query for the list endpoint also stopped selecting the description and stopped joining data needed only to generate implementation commands.

Loading the Preview Without Blocking the List

The Tickets page still needed to open a preview panel when a card was selected.

Instead of delaying the entire page, the interaction became:

  1. Render the ticket list from summary data.
  2. Open the preview shell immediately using the selected summary.
  3. Fetch the complete ticket in the background.
  4. Cache the detail response by ticket ID.
  5. Render the Markdown description when it arrives.

In simplified form:

const featureDetails: Record<string, FeatureDetailItem> = {};

async function loadFeatureDetail(featureId: string) {
  if (featureDetails[featureId]) {
    return featureDetails[featureId];
  }

  const response = await fetch(
    `/projects/${projectId}/features/${featureId}/detail`
  );

  const feature = await response.json();
  featureDetails[featureId] = feature;

  return feature;
}

Direct navigation to a selected ticket still loads the summary list and the selected detail concurrently on the server.

So the optimization did not remove functionality. It changed when the expensive data was requested.

The Result

After separating list and detail payloads:

Response Before After Reduction
Feature list API 353,956 B 36,911 B 89.6%
Tickets route data 349,857 B 30,192 B 91.4%
Timeline route data 354,731 B 34,967 B 90.1%

A selected ticket detail was around:

20,658 bytes

But that payload is now requested only when the user selects the ticket.

The OpenSpec docs page had the same optimization applied:

Response Before After Reduction
OpenSpec docs API 681,558 B 7,257 B 98.9%
OpenSpec docs page data 704,385 B 39,516 B 94.4%

The database was fast before and remained fast afterward.

The meaningful improvement came from sending less data through the complete request path.

What Would Not Have Fixed It

A loading indicator could make the delay less confusing, but it would not remove the delay.

Optimizing the PostgreSQL query would also have targeted the wrong layer. The API already responded in a few milliseconds.

Code splitting the frontend bundle would not remove data returned by +page.server.ts.

The bottleneck was the contract between the list page and the API.

Takeaways

The main lesson was simple:

A fast query does not automatically produce a fast page.

For list-heavy applications:

  1. Measure response size, not only response time.
  2. Treat list and detail payloads as different contracts.
  3. Do not return large text fields unless the current view needs them.
  4. Check what the SSR loader serializes into route data.
  5. Measure shared endpoints from every consumer's perspective.
  6. Lazy-load detail data, but render the interaction shell immediately.
  7. Cache detail responses when users may reopen the same item.
  8. Do not use a spinner as a substitute for removing unnecessary work.

In this case, the VPS was not the real problem.

It only exposed a payload problem that localhost had been hiding.