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

Use MutateObserver to prevent loading lag #22

Closed
wants to merge 1 commit into from
Closed

Use MutateObserver to prevent loading lag #22

wants to merge 1 commit into from

Conversation

yxlin118
Copy link

issue #19

}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the extra space. This file should not be shown as changed file

for (let i = 0; i < timesToJSrun.length; i++) {
setTimeout(() => { clasifyImages() }, timesToJSrun[i]);
}
//Call function when changes made in DOM tree
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you load a web page at first the images are hidden without any lag. But when the same page is reloaded, the filter does not work. Also I am experiencing considerable slowing down of my browser while running the extension that did not happen before

Copy link
Author

@yxlin118 yxlin118 Jul 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which page are you testing with? And when you say reload, does that mean refreshing?(I tried https://scrolller.com/nsfw and it seems to work). Is there a way to see the slowing down of the browser? I didn't notice it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with Google Images. I tried to reload/refresh on the browser and the filter did not seem to work then. I tried with the current MASTER branch and the PR and there was a considerable lag between them. Could you test it out thoroughly?

@pottekkat
Copy link
Collaborator

@yxlin118 Please test it once again and check if you are experiencing any issues

@yzevm
Copy link
Collaborator

yzevm commented Jul 28, 2020

@yxlin118 Thanks for contributing, pls check my PR #26, now we can handle dynamic JS rendering, you'll go to website in README and choose only pics in settings, we detect new images with MutationObserver

But your bug #19 is still exists, I mean Im not sure thats about dynamic render or not, it takes <250ms to hide every image, but I still have no idea how to remove this time lag, hope we will find solution

@yzevm
Copy link
Collaborator

yzevm commented Jul 29, 2020

v1.0.0 is merged #29, thanks for your contribution

@yzevm yzevm closed this Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants