microsoft / microsoft/TypeScript-Sublime-Plugin

Plugin slows down Sublime Text

Open
#716 3 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
236
Avg merge
21d 13h
Merged PRs (30d)
1

Description

Typescript plugin extremely slows down text typing and selection performance on large files like tsserver.js. Slowing down appears even after renaming that file to .txt and opening as Plain Text. This is very annoying when you need to view large logs or csv files.

This behavior is reproducible in clean portable installation of Sublime Text with only TypeScript plugin installed even without opened project and tsconfig.json.

Disabling plugin via Package Control makes Sublime smooth again. Can using *_async api help here? Or is there any setting to disable processing non-js/ts files?

System Info
Item Value
CPUs Intel(R) Core(TM) i5-4430 CPU @ 3.00GHz (4 x 3000)
Memory (System) 15.93GB (9.38GB free)
System Windows 10.0.17763.475 (x64)
Sublime v3.2.1 build 3207 x64 stable channel
Typescript plugin v3.4.1
Plugin Event Profile
This list shows how much time each plugin has taken to respond to each event:

on_activated:
    Default.pane: 0.001s total, mean: 0.000s, max: 0.001s
    TypeScript.typescript.listeners.listeners: 1.334s total, mean: 0.056s, max: 0.265s

on_close:
    Default.pane: 0.000s total, mean: 0.000s, max: 0.000s
    TypeScript.typescript.listeners.listeners: 0.164s total, mean: 0.055s, max: 0.163s

on_deactivated:
    Default.history_list: 0.011s total, mean: 0.000s, max: 0.002s

on_hover:
    Default.symbol: 0.004s total, mean: 0.000s, max: 0.001s
    TypeScript.typescript.listeners.listeners: 3.556s total, mean: 0.155s, max: 0.691s

on_load:
    Default.detect_indentation: 0.003s total, mean: 0.002s, max: 0.003s
    TypeScript.typescript.listeners.listeners: 0.000s total, mean: 0.000s, max: 0.000s
    Default.exec: 0.003s total, mean: 0.001s, max: 0.002s

on_modified:
    TypeScript.typescript.listeners.listeners: 36.134s total, mean: 0.317s, max: 1.174s

on_pre_close:
    Default.history_list: 0.000s total, mean: 0.000s, max: 0.000s

on_selection_modified:
    TypeScript.typescript.listeners.listeners: 88.955s total, mean: 0.217s, max: 1.569s

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by profiling the TypeScript plugin listeners for on_modified and on_selection_modified when large files such as tsserver.js are opened as Plain Text. Compare the behavior with the plugin disabled and investigate whether Sublime Text's *_async EventListener API or file-type filtering applies. Done means typing and selection remain responsive in large .txt, log, or CSV files without breaking TypeScript-file behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.