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

Create constant WikiSite for Commons and Wikidata. #3230

Merged
merged 1 commit into from
Mar 28, 2022
Merged

Conversation

dbrant
Copy link
Member

@dbrant dbrant commented Mar 28, 2022

There are a ton of places where we create new instances of WikiSite objects for Commons and Wikidata, when in fact these objects only need to be created once. The instantiation of WikiSite is actually a bit heavy, with text parsing and additional logic, so this is an optimization that could add up performance-wise.

@dbrant dbrant added the Minor Minor stuff label Mar 28, 2022
@cooltey cooltey merged commit 2e1bdb7 into main Mar 28, 2022
@cooltey cooltey deleted the constantSites branch March 28, 2022 22:38
sharvaniharan added a commit that referenced this pull request Apr 6, 2022
* main: (23 commits)
  Fix updating of reading lists after renaming. (#3251)
  Update kotlin-gradle-plugin version to 1.6.20 (#3250)
  Fix: update talk page pageTitle after changing the language (#3241)
  Refactor title functions (#3232)
  Disable flaky test of EventPlatformClient. (#3249)
  Prevent possible crash when highlighting text for editing. (#3248)
  Bump version code (#3247)
  Article clicks and Edit history analytics wiring (#3234)
  Change affects to affect (incorrect plural) (#3242)
  Fix improper scrolling/jumping when composing long Talk message. (#3245)
  Fix behavior of article overflow menu in split-screen mode. (#3244)
  Improve OOP logic for analytics events containing state information. (#3240)
  Localisation updates from https://translatewiki.net.
  Convert EventPlatformClient to kotlin. (#3239)
  Localisation updates from https://translatewiki.net.
  Get the updated value of duration in timed events. (#3237)
  Add DAO method to get multiple reading lists. (#3224)
  Fix deserialization of pageId. (#3236)
  Further optimize API calls to Commons and Wikidata. (#3227)
  Create constant WikiSite for Commons and Wikidata. (#3230)
  ...

# Conflicts:
#	app/src/main/res/layout/view_page_action_overflow.xml
sharvaniharan added a commit that referenced this pull request Apr 6, 2022
* main: (39 commits)
  Fix updating of reading lists after renaming. (#3251)
  Update kotlin-gradle-plugin version to 1.6.20 (#3250)
  Fix: update talk page pageTitle after changing the language (#3241)
  Refactor title functions (#3232)
  Disable flaky test of EventPlatformClient. (#3249)
  Prevent possible crash when highlighting text for editing. (#3248)
  Bump version code (#3247)
  Article clicks and Edit history analytics wiring (#3234)
  Change affects to affect (incorrect plural) (#3242)
  Fix improper scrolling/jumping when composing long Talk message. (#3245)
  Fix behavior of article overflow menu in split-screen mode. (#3244)
  Improve OOP logic for analytics events containing state information. (#3240)
  Localisation updates from https://translatewiki.net.
  Convert EventPlatformClient to kotlin. (#3239)
  Localisation updates from https://translatewiki.net.
  Get the updated value of duration in timed events. (#3237)
  Add DAO method to get multiple reading lists. (#3224)
  Fix deserialization of pageId. (#3236)
  Further optimize API calls to Commons and Wikidata. (#3227)
  Create constant WikiSite for Commons and Wikidata. (#3230)
  ...

# Conflicts:
#	app/src/main/java/org/wikipedia/page/PageActivity.kt
#	app/src/main/java/org/wikipedia/views/PageActionOverflowView.kt
#	app/src/main/res/layout/view_page_action_overflow.xml
#	app/src/main/res/values-qq/strings.xml
sharvaniharan added a commit that referenced this pull request Apr 6, 2022
* pageToolbarT302397_design: (39 commits)
  Fix updating of reading lists after renaming. (#3251)
  Update kotlin-gradle-plugin version to 1.6.20 (#3250)
  Fix: update talk page pageTitle after changing the language (#3241)
  Refactor title functions (#3232)
  Disable flaky test of EventPlatformClient. (#3249)
  Prevent possible crash when highlighting text for editing. (#3248)
  Bump version code (#3247)
  Article clicks and Edit history analytics wiring (#3234)
  Change affects to affect (incorrect plural) (#3242)
  Fix improper scrolling/jumping when composing long Talk message. (#3245)
  Fix behavior of article overflow menu in split-screen mode. (#3244)
  Improve OOP logic for analytics events containing state information. (#3240)
  Localisation updates from https://translatewiki.net.
  Convert EventPlatformClient to kotlin. (#3239)
  Localisation updates from https://translatewiki.net.
  Get the updated value of duration in timed events. (#3237)
  Add DAO method to get multiple reading lists. (#3224)
  Fix deserialization of pageId. (#3236)
  Further optimize API calls to Commons and Wikidata. (#3227)
  Create constant WikiSite for Commons and Wikidata. (#3230)
  ...

# Conflicts:
#	app/src/main/res/values-fr/strings.xml
#	app/src/main/res/values-ja/strings.xml
#	app/src/main/res/values-qq/strings.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Minor stuff
2 participants