Skip to content

Opening very large JSON file freezes Godot #114101

@ev1313

Description

@ev1313

Tested versions

4.5.1 and current master

System information

Linux

Issue description

When opening a very large, one line JSON file (197KB), the godot editor just freezes (also across restarts).

When profiling it hangs in the following stacktrace:

Image

It uses >90% of time in this function:

Image

I therefor assume it's necessary to add some functionality, that disables the syntax highlighter for files with more than 20k characters or something like that.

Steps to reproduce

  1. Create a big json file, one line.
  2. open it in godot text editor

Minimal reproduction project (MRP)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions