Skip to content

[WIP] Review: don't dump whole RC list when first nominated for delete #1544

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

Closed
wants to merge 54 commits into from

Conversation

ejegg
Copy link
Contributor

@ejegg ejegg commented May 20, 2018

Instead of looking for a whole new 10 recent changes, keep looking
through the same image list when one is nominated for deletion.

Description (required)

Fixes #{GitHub issue number and title}

{Describe the changes made and why they were made.}

Tests performed (required)

Tested on {API level & name of device/emulator}, with {build variant, e.g. ProdDebug}.

Screenshots showing what changed (optional)

{Only for user interface changes, otherwise remove this section. See how to take a screenshot}

Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.

neslihanturan and others added 30 commits May 19, 2018 10:00
* First draft of fn to get random recent image

* Use log entries for requests to beta, try to connect refresh button

FIXME: runs http request on main thread, breaks

* Tweak button connection
* tiny fixes

* Load pictures into activities
* Use standalone category extraction code in MediaDataExtractor

* Add categories to category review page
neslihanturan and others added 20 commits May 20, 2018 11:16
time-based randomness is biased - if someone uploaded 100 images in
hour, one week ago, and I select a random point in time, their last
image is way more likely to come up than anything else.

With this, there is still bias towards choosing one of the last N
in any burst of uploads (where N is the number of recent changes
fetched) but it's a bit better than before.
Instead of looking for a whole new 10 recent changes, keep looking
through the same image list when one is nominated for deletion.
@codecov-io
Copy link

codecov-io commented May 20, 2018

Codecov Report

Merging #1544 into wikimedia-hackathon-2018 will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@                     Coverage Diff                     @@
##           wikimedia-hackathon-2018   #1544      +/-   ##
===========================================================
- Coverage                      2.97%   2.97%   -0.01%     
===========================================================
  Files                           146     146              
  Lines                          7819    7823       +4     
  Branches                        747     747              
===========================================================
  Hits                            233     233              
- Misses                         7571    7575       +4     
  Partials                         15      15
Impacted Files Coverage Δ
...ree/nrw/commons/media/RecentChangesImageUtils.java 0% <0%> (ø) ⬆️
...in/java/fr/free/nrw/commons/delete/DeleteTask.java 0% <0%> (ø) ⬆️
...rw/commons/mwapi/ApacheHttpClientMediaWikiApi.java 4.93% <0%> (-0.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48b5c0a...b308aa3. Read the comment docs.

@maskaravivek
Copy link
Member

@ejegg Is this PR ready for review?

@neslihanturan Are you aware of the state of this PR?

@maskaravivek maskaravivek force-pushed the wikimedia-hackathon-2018 branch from 12d36d5 to 3574b1d Compare January 1, 2019 07:41
@domdomegg domdomegg changed the title Review: don't dump whole RC list when first nominated for delete [WIP] Review: don't dump whole RC list when first nominated for delete Mar 17, 2019
@neslihanturan
Copy link
Collaborator

Closing this issue since so many thing in the code changed since then. But the optimization here is important. I tried to combine this optimization with the current implementation, but I failed due to lack of Rxjava knowledge. So pinging @maskaravivek , just see the last commit from the commit history.

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.

5 participants