opral / monorepo

globalization ecosystem && change control SDK
https://opral.com
Apache License 2.0
1.17k stars 96 forks source link

[bug] changing project.inlang.json causes computer immense lag with vscode extension installed #1685

Closed KraXen72 closed 10 months ago

KraXen72 commented 10 months ago

Problem

changing for example the source language in the project.inlang.json makes my entire computer lag for several seconds up to a minutes

if you cannot easily reproduce it, try first adding proper log output to the vscode extension, and i'll update this issue afterwards.

Expected behavior

it would not cause my computer to sound like a jet engine an my mouse to lag

Reproduction

i am developing a svetelkit application. this is what i am using as a vite plugin: https://github.com/albbus-stack/kit-stack/blob/main/src/lib/paraglide-plugin.ts

unfortunately, i cannot provide my repository as it is private. but i can link to some of it's files: project.inlang.json

{
  "$schema": "https://inlang.com/schema/project-settings",
  "sourceLanguageTag": "sk",
  "languageTags": [
    "en",
    "sk"
  ],
  "modules": [
    "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js",
    "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@latest/dist/index.js",
    "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js",
    "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js",
    "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js",
    "https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
  ],
  "plugin.inlang.messageFormat": {
    "pathPattern": "./i18n/{languageTag}.json"
  }
}

svelte.config.json

/** @type {import('@sveltejs/kit').Config} */
const config = {
  extensions: [".svelte", ...mdsvexConfig.extensions],
  preprocess: [
    vitePreprocess(),
        mdsvex(mdsvexConfig)
  ],
  kit: {
    adapter: adapter(),
    alias: {
      $assets: "src/assets",
      $paraglide: 'src/paraglide'
    },
  },
};

export default config;

part of package.json

"devDependencies": {
    "@iconify-json/ic": "^1.1.14",
    "@iconify-json/lucide": "^1.1.141",
    "@iconify-json/svg-spinners": "^1.1.2",
    "@sveltejs/adapter-auto": "^2.1.1",
    "@sveltejs/kit": "^1.27.6",
    "@types/js-yaml": "^4.0.9",
    "@types/node": "^20.9.3",
    "@unocss/extractor-svelte": "^0.57.7",
    "fast-glob": "^3.3.2",
    "json-schema-to-dts": "^1.5.0",
    "linkedom": "^0.16.4",
    "mdsvex": "^0.11.0",
    "rehype-autolink-headings": "^7.1.0",
    "rehype-slug": "^6.0.0",
    "svelte": "^4.2.7",
    "svelte-check": "^3.6.0",
    "tslib": "^2.6.2",
    "tsx": "^4.2.0",
    "type-flag": "^3.0.0",
    "typescript": "^5.3.2",
    "unocss": "^0.57.7",
    "vite": "^5.0.2",
    "vite-plugin-restart": "^0.4.0"
  },
  "type": "module",
  "dependencies": {
    "@fontsource-variable/inter": "^5.0.15",
    "@fontsource/inter": "^5.0.15",
    "@iconify-json/flag": "^1.1.43",
    "@unocss/reset": "^0.57.7",
    "email-validator": "^2.0.4",
    "js-yaml": "^4.1.0",
    "rehype-external-links": "3.0.0",
    "rehype-rewrite": "^3.0.6",
    "remark-footnotes": "2.0.0",
    "shiki": "^0.14.5",
    "svelte-select": "^5.8.1",
    "ulid": "^2.3.0",
    "@inlang/paraglide-js": "1.0.0-prerelease.9"
  },

Other information

Vivaldi Latest Stable Windows 10

samuelstroschein commented 10 months ago

That is an interesting problem. I assign @felixhaeberle who is leading the ide extension efforts at the moment

KraXen72 commented 10 months ago

this appears to be fixed in version 1.20.0. i will re-open if it happens again.