I'm experiencing a noticeable slowdown of the NXT web UI when PwdHash is enabled. Profiler shows that the culprit is discoverPasswordFields function which is consuming CPU. I've found a simple workaround for this:
var searchInProgress = null;
var discoverPasswordFields = function(event) {
if (searchInProgress) {
clearTimeout(searchInProgress);
}
searchInProgress = setTimeout(function() {
searchInProgress = null;
if (Self.searchInputs(event)) {
chrome.extension.sendRequest({controller: 'Background_HTML', action: 'showPwdHashIcon'});
}}, 1000);
};
Something like this. It's not quite necessary to find password fields ASAP, one second is enough to prevent cascaded launches because of the DOM updates so it relieves some stress. But it's better to make this search faster of course.
I'm experiencing a noticeable slowdown of the NXT web UI when PwdHash is enabled. Profiler shows that the culprit is discoverPasswordFields function which is consuming CPU. I've found a simple workaround for this:
Something like this. It's not quite necessary to find password fields ASAP, one second is enough to prevent cascaded launches because of the DOM updates so it relieves some stress. But it's better to make this search faster of course.