I have written my own plugin which is periodically making a get request.
With theia 1.46.1 and the browser-example, I see the memory of process plugin-host is growing very rapidly. In 10min up to 700MB.
When installing the exact same plugin in theia 1.34.4 the memory stays constant.
I commented all out in my plugin to exclude any side effects. This is the minimal code required to reproduce the issue:
import vscode = require('vscode');
import got = require('got');
export const logDebug = vscode.window.createOutputChannel("debugging");
export function activate(context: vscode.ExtensionContext) {
const gotOptions = () => {
let options = {
baseUrl: `https://doesnotmatter}`,
headers: {
'Authorization': `Bearer asdf`,
'Host': 'localhost'
},
rejectUnauthorized: false
}
return options;
}
const statusBarItem = vscode.window.createStatusBarItem();
const toggleStatus = async () => {
try {
logDebug.appendLine("polling...")
const data = await got.get('/someurl', { ...gotOptions(), json: true })
if ('value' in data.body) {
return data.body.value;
} else {
return data.body;
}
// normally i do here some usefull things with data.
} catch (error) {
statusBarItem.text = `$(tools) Please configure plugin`
}
statusBarItem.show();
}
setInterval(toggleStatus, 5000)
}
I also replaced the got library with the axios library to see if the error comes from there. But it had no effect.
Steps to Reproduce:
Create a plugin with the above code and watch the memory of process plugin-host increasing.
Bug Description:
I have written my own plugin which is periodically making a get request. With theia 1.46.1 and the browser-example, I see the memory of process plugin-host is growing very rapidly. In 10min up to 700MB.
When installing the exact same plugin in theia 1.34.4 the memory stays constant. I commented all out in my plugin to exclude any side effects. This is the minimal code required to reproduce the issue:
I also replaced the got library with the axios library to see if the error comes from there. But it had no effect.
Steps to Reproduce:
Additional Information