Skip to content

MediaDataExtractor is making inefficient (redundant) server calls #1464

@psh

Description

@psh

Summary:

MediaDataExtractor is making double calls to the mediawiki API to determine if a page (image) has been deleted. Its not wrong, just inefficient.

Steps to reproduce:

Take a look at the fetch() method

try{
    Timber.d("Nominated for deletion: " + mediaWikiApi.pageExists("Commons:Deletion_requests/"+filename));
    deletionStatus = mediaWikiApi.pageExists("Commons:Deletion_requests/"+filename);
}
catch (Exception e){
    Timber.d(e.getMessage());
}

Expected behavior:

Only one call should be made, and then the request / result should be logged. Calling pageExists() initiates a call to the server every time.

Commons app version:

Current master branch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions