Visitar URL original
Sublime freezes whan I try to format large css file. · Issue #147 · jonlabelle/SublimeJsPrettier · GitHub
Skip to content

Sublime freezes whan I try to format large css file. #147

Closed

Description

@maxonik

Please try to format this file http://silentcode.org/bitrix/cache/css/s1/main/template_6fb3afcdea0e0b842910d8990e319c2a/template_6fb3afcdea0e0b842910d8990e319c2a.css?148381411788539 and see what happen.
My Sublime freezes
Its ok if I format online here https://prettier.io/playground/
And works fine in Visual studio code

thanks for help!

Activity

  1. jonlabelle commented on Nov 22, 2018

    @jonlabelle
    Owner

    I actually noticed this also, freezing of minified (one line files) and or larger files. However, when I ran the same file(s) directly against prettier, same result... nodejs just churned and churned as it did in ST.

    I think i tracked it down to cursor offset getting hung up somewhere - not being able to calculate the proper position.

    May @kaste can take a look and see if he can reproduce (ala PR #120); and we send it off to Prettier as defect to investigate.

  2. kaste commented on Nov 24, 2018

    @kaste
    Contributor

    So the use case here is basically to unuglify built files?

    For Sublime, reading or setting the cursor is no problem. Only writing to the Sublime built-in console is super slow and it will in fact freeze Sublime if you for example log file contents or larger diffs to it. So you always have to make sure no debugging logger is attached to the console. (E.g. you have noticable delays even for moderately small files if you run SublimeLinter in debug mode.)

    However, if you already managed to reproduce it on the cli then it's seems of course to be a bug on prettier's side.

  3. jonlabelle commented on Nov 24, 2018

    @jonlabelle
    Owner

    It's definitely not an issue with Sublime Text (or the JsPrettier plug-in).

    I've attached a small demo which reproduces the issue from the CLI. Assuming you're on macOS or Linux; download and extract the zip... then run bash prettier-cli.sh.

  4. lock commented on Aug 1, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  5. locked as resolved and limited conversation to collaborators on Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions