Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Disable time shown for each line of execution #34248

Open
ZooDoo4U opened this issue Jan 8, 2025 · 5 comments
Open

[Feature]: Disable time shown for each line of execution #34248

ZooDoo4U opened this issue Jan 8, 2025 · 5 comments
Assignees
Labels

Comments

@ZooDoo4U
Copy link

ZooDoo4U commented Jan 8, 2025

🚀 Feature Request

Not sure if this is a bug or a feature request. When running a test, as well as a couple other people trying it, seems the VS Code Plug is reporting the time taken per line and how long it took to execute. When debugging in VS code my box (all local) the test runs in 10 minutes, friends box13, but that would be Seattle to NZ...

That said in the code about 3 lines from the bottom i put " // set break point here...". While the test takes 10 minutes to run, once the code hits the break point, VS Code will spend the next 1.5 HOURS doing nothing than what appears to update the time each line took to run... The one difference between my box and my friend in NZ, his box has less ram, and he mentioned a couple times VS Code crashed, but just a guess either out of memory or something was off. and my box i haven't seen that but i have 128Gb ram.

So it this bug of a feature request, right not not sure.

`
import type { Locator } from '@playwright/test';
import { test } from '@playwright/test';

const getListElements = async (listCtrl: Locator): Promise<string[]> => {
const ctrlLocator = listCtrl.locator('option');
return await ctrlLocator.allTextContents();
};

const bibleUrl = 'http://ask for url/';
test.only('vs code freezes for debug execution times', async ({ page }) => {
const versionLimit = 17;
const bookLimit = 500;
const chapterLimit = 500;

await page.goto(bibleUrl);
const versionCtrl = page.locator('#versions');
const bookCtrl = page.locator('#books');
const chapterCtrl = page.locator('#chapters');
await versionCtrl.waitFor();

const versionsList = await getListElements(versionCtrl);
for (const [versionIndex, version] of versionsList.entries()) {
if (versionIndex > versionLimit) {
console.log('Reached version limit');
break;
}
await test.step(Version ${version}, async () => {
await versionCtrl.selectOption(version);
const booksList = await getListElements(bookCtrl);
for (const [bookIndex, book] of booksList.entries()) {
if (bookIndex > bookLimit) {
console.log('Reached book limit');
break;
}
await test.step(Book ${book}, async () => {
await bookCtrl.selectOption(book);
const chapterList = await getListElements(chapterCtrl);
for (const [chapterIndex, chapter] of chapterList.entries()) {
if (chapterIndex > chapterLimit) {
console.log('Reached chapter limit');
break;
}
await chapterCtrl.selectOption(chapter);
}
});
}
});
} // set break point here...
});
`
My attempt to file a bug on VS Code,
microsoft/vscode#235706 (comment)

What i'll see for about 1.5 HOURS when vs code is frozen but do see the screen time times flickering...

Image

Example

No response

Motivation

Prevent wasting hours. Seems nothing is effective being performed, and simply waste a lot of time for no reason...

@ZooDoo4U ZooDoo4U changed the title [Feature]: Disable time shown for each line of exectution [Feature]: Disable time shown for each line of execution Jan 8, 2025
@Skn0tt
Copy link
Member

Skn0tt commented Jan 8, 2025

Based on the screenshot you shared, it looks to me that chapterList just has a lot of entries and it's executing the line once per entry.

If you believe there's a bug with Playwright here, please create a reproduction repo that showcases this on a blank project.

@ZooDoo4U
Copy link
Author

ZooDoo4U commented Jan 8, 2025

Thanks Scott, i tried sending a private chat in Discord...

@tphillips-ict
Copy link

I was helping out with testing this.

The issue we were having is that the playwright vscode plugin is taking a very long time to process through its UI update events to highlight the line it's on and add on the execution time. It would be nice to be able to disable these vscode UI updates for these instances where there are a lot of things done in a loop.

@Skn0tt
Copy link
Member

Skn0tt commented Jan 9, 2025

Gotcha! So you're saying that it's correct that this happens so often, but it creates a performance problem in the UI. I can take a look at that.

@Skn0tt Skn0tt self-assigned this Jan 9, 2025
@Skn0tt Skn0tt added the v1.50 label Jan 9, 2025
@ZooDoo4U
Copy link
Author

ZooDoo4U commented Jan 9, 2025

Oooops forgot, and turned the machine off... I'll make a point to keep it up for a while...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants