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
Screenshot: stop repeating the same screenshot over and over when it doesn't change #2949
Comments
Can I give this a try? @julienw |
Can I work on this? |
Hey @raymond-sikpojie, yes sure! |
Hey @julienw. I tried but I really don't know how to go about this one. Can I be unassigned from this issue? Thanks |
@julienw can i give this a go? |
Sure @karenefereyan, let us know if you need anything! |
hey @karenefereyan, is that still something you'd like to work on? It's totally OK if you don't, but please tell us so that we can reset the status of this issue. Thanks! |
@julienw please reassign it to someone else as I'm having some technical challenges currently |
No worries, thanks for telling us :-) |
@julienw i would like to work on it. |
what exactly is the task is it to only show the screen shot and if it is not changing then we do not show it until the new screenshot has a change relative to previous one . do i got it wright or correct me if i am wrong . and what to show if the screenshot does not changes . |
Yes, this is exactly this! If the screenshot does not change, I believe this could just be "blank", nothing drawn. We can decide later if we want to change the background to something grey instead of white, but that's easy to do later. |
@julienw how are we going to compare screenshots . |
@julienw hey can you help me with comparing screenshots |
Hey @Bucky25, in this issue we don't want to compare? So I don't understand your question... Can you please explain this more? |
In this patch we want to do an experiment, it's not sure we'll land this in the end.
This experiment is that we don't want that we repeat the screenshot in the screenshot track, if it doesn't change.
The current logic is at
profiler/src/components/timeline/TrackScreenshots.js
Lines 273 to 333 in 0ecc660
What it does is that for each pixel we try to find the right screenshot. Especially here:
profiler/src/components/timeline/TrackScreenshots.js
Lines 301 to 307 in 0ecc660
We see that if don't find a screenshot, by
break
ing we reuse the previous data.We also see that there are 2 nested loops: the outer loop loops over the pixel "left" information, and the inner loops over the screenshots.
Instead I think we'll want to invert the logic: the outer loop looping over the screenshots, and some logic inside to compute the "left" information. Especially take care that we don't overlap images, so when looping over the screenshots you'll need to skip them until we have some space. When finally we have some space we'll need to display the last screenshot.
Maybe that's not the easiest solution, and instead we should just change something at the
break
in the existing code. So this will need some research.Here are some profile links containing screenshots:
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: