Skip to content

Nicegui watchdog breaks pylance and performance drops in vscode #5160

@phifuh

Description

@phifuh

First Check

  • I added a very descriptive title here.
  • This is not a Q&A. I am sure something is wrong with NiceGUI or its documentation.
  • I used the GitHub search to find a similar issue and came up empty.

Example Code

.run(reload=False, title="Report builder", port=8080)

Description

In the past two weeks, I noticed that Pylance was crashing very frequently in VsCode, and the crashes started happening at shorter and shorter intervals. It eventually got to the point where I couldn’t bear it anymore, so I started digging into what was causing the issue.

Naturally, I first looked at my VS Code extensions and disabled most of them, but that had no effect. Then I noticed that my NiceGUI application had also become “laggy,” which often forced me to reset it manually. After some testing, I disabled the reload function — and boom, no more problems:

ui.run(reload=False, title="Report builder", port=8080)

I confirmed this with a colleague who had the same issue. I also tested it on three different PCs, and it seems that the reload function is what’s causing the problem.

I’m not sure how to dig deeper into this, but I thought it would be helpful to at least create an issue for it.

NiceGUI Version

sortable branch

Python Version

3.13

Browser

Chrome

Operating System

Windows

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    analysisStatus: Requires team/community input

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions