[GH-ISSUE #765] Script editor becomes unresponsive, and syntax highlighting breaks when script contains very long lines. #760

Open
opened 2026-03-03 19:21:39 +03:00 by kerem · 3 comments
Owner

Originally created by @mprice-banno on GitHub (Jan 26, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/765

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

Version 2.16.1 (21610

macOS Version? (Ex. mac 10.14)

10.15.6

Steps to reproduce

Lower priority issue.

The script editor becomes very unresponsive when you're editing a script that contains very long lines. See attached config file for an example. Editing will stop and start. It looks like auto completion is likely the problem. Syntax highlighting appears to break halfway through the line. See attached screen shot

Removing the long lines, the var name1 and var name2 in generateName() in this particular case, seems to resolve the issue. I don't know if it's the length of the line, or the number of elements in the arrays being defined that is causing the issue.

  1. Import the the attached config file.
  2. Open scripts list
  3. Open script and try editing, typing etc.

Results

  • Edit becomes very unresponsive, when typing a word testing for example, there is 2-3 second pause before the characters appear, and then auto complete appears
  • Syntax highlighting breaks
Screen Shot 2021-01-26 at 10 14 40 AM

Expected behavior

Editor should be responsive.

UnresponsiveEditor.config.zip

Originally created by @mprice-banno on GitHub (Jan 26, 2021). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/765 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) Version 2.16.1 (21610 ### macOS Version? (Ex. mac 10.14) 10.15.6 ### Steps to reproduce Lower priority issue. The script editor becomes very unresponsive when you're editing a script that contains very long lines. See attached config file for an example. Editing will stop and start. It looks like auto completion is likely the problem. Syntax highlighting appears to break halfway through the line. See attached screen shot Removing the long lines, the `var name1` and `var name2` in `generateName()` in this particular case, seems to resolve the issue. I don't know if it's the length of the line, or the number of elements in the arrays being defined that is causing the issue. 1. Import the the attached config file. 2. Open scripts list 3. Open script and try editing, typing etc. ### Results - Edit becomes very unresponsive, when typing a word `testing` for example, there is 2-3 second pause before the characters appear, and then auto complete appears - Syntax highlighting breaks <img width="804" alt="Screen Shot 2021-01-26 at 10 14 40 AM" src="https://user-images.githubusercontent.com/58708906/105886670-8635d800-5fbf-11eb-88d6-3bb40078c93c.png"> ### Expected behavior Editor should be responsive. [UnresponsiveEditor.config.zip](https://github.com/ProxymanApp/Proxyman/files/5875162/UnresponsiveEditor.config.zip)
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 27, 2021):

Hey @mprice-banno, thanks for reporting this issue.

To work around, I'd highly suggest using "Import JSON or Files" in the Scripting (https://docs.proxyman.io/scripting/snippet-code#json)

After importing, you will get the file and you're able to change the value inside like the following code:

const file = require("@users/myfile.json");

// Modify file as usual
file["name"] = "Proxyman"

response.body = file
<!-- gh-comment-id:767955922 --> @NghiaTranUIT commented on GitHub (Jan 27, 2021): Hey @mprice-banno, thanks for reporting this issue. To work around, I'd highly suggest using "Import JSON or Files" in the Scripting (https://docs.proxyman.io/scripting/snippet-code#json) After importing, you will get the file and you're able to change the value inside like the following code: ```js const file = require("@users/myfile.json"); // Modify file as usual file["name"] = "Proxyman" response.body = file ```
Author
Owner

@mprice-banno commented on GitHub (Jan 27, 2021):

Thanks @NghiaTranUIT that'll work fine. 👍

<!-- gh-comment-id:768326640 --> @mprice-banno commented on GitHub (Jan 27, 2021): Thanks @NghiaTranUIT that'll work fine. 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 27, 2021):

Awesome 🙌

<!-- gh-comment-id:768327395 --> @NghiaTranUIT commented on GitHub (Jan 27, 2021): Awesome 🙌
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#760
No description provided.