Skip to content

Opening large binary files reads full contents #138805

Closed

Description

@kaala

Does this issue occur when all extensions are disabled?: Yes

Version: 1.63.0 (Universal)
OS: Darwin x64 20.6.0

Steps to Reproduce:

  1. open a folder contains some very large zip files
  2. select the zip files
  3. edit pane become unresponsive
  4. after a long time, edit pane display message: The file is not displayed in the editor because it is either binary or uses an unsupported text encoding

I don't want to open zip file in vscode, but there are some time I select the file by mistake. and then vscode freeze for a long time.
This happens both in vscode and vscode remote ssh.
I need a file extension blacklist, or make the binary detect fast.

Activity

  1. j824h commented on Dec 10, 2021

    @j824h
    Contributor

    Related to #132771.
    When I've made the same mistakes, I don't usually felt that encoding detection is so slow.
    Does it work differently in macOS from in Windows or GNU/Linux?

  2. bpasero commented on Dec 10, 2021

    @bpasero
    Contributor

    Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

  3. added
    info-needed
    bug
    important
    and removed
    info-needed
    on Dec 10, 2021
  4. added
    file-encoding
    file-io
    and removed
    file-encoding
    on Dec 10, 2021
  5. bpasero commented on Dec 10, 2021

    @bpasero
    Contributor

    Nevermind, great catch. We indeed seem to read the entire file and try to decode it even though we could bail out earlier given we only accept text.

    This does not seem like a regression though, I can reproduce slowness also in previous stable.

  6. kaala commented on Dec 10, 2021

    @kaala
    Author

    The problem also exist in insider build
    You are correct about decode
    图片

  7. changed the title [-]open binary file takes long time[/-] [+]Opening large binary files reads full contents[/+] on Dec 10, 2021
  8. bpasero commented on Dec 10, 2021

    @bpasero
    Contributor

    A fix for this will be available in our insiders build on Monday, would be good to verify then. I also tried to tackle #132771 so that the reading of large files really stops on the remote end as well.

    You can give our preview releases a try from: https://code.visualstudio.com/insiders/

  9. locked and limited conversation to collaborators on Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugfile-ioimportantverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions