longchasen
6 years agoContributor
Finding object getting slow
i have an extension which input data from a combo box and part of the routine is to find the dropdown object which only show on DOM after first dropdown, this is the snippet code:
pickerMenu = page.find("idStr",pickerMenuId,1);
as you can see i have define the depth to 1 as i know it will alwas shown on that depth. It run fast initially but after some time it getting slower from initial 0.2 to 17 seconds after 20 minutes. Im monitoring the CPU and memory usage and it shows below 100% most of the time. I made a routine to refresh the browser to remove some object on the DOM but it still persist, i need to make the performance consistent with same routine over long run.