The views PluginBase::defineOptions() is called upon initializing the plugin. It should provide defaults.

GoogleAnalyticsQuery::defineOptions() however calls google_analytics_reports_api_profiles_list(). This call is not cached and results in slow views, even when the view result is cached.

The call to google_analytics_reports_api_profiles_list() seems unnecessary.

CommentFileSizeAuthor
#2 2825785-2.patch989 bytescasey

Comments

casey created an issue. See original summary.

casey’s picture

Status: Active » Needs review
StatusFileSize
new989 bytes
othermachines’s picture

I can't for the life of me figure out why that would have been called in the first place (unnecessary carry-over from D7 perhaps). Anyway, patch in #2 applies cleanly and doesn't seem to have any affect on the views output. Thumbs up!

google_analytics_reports 8.x-3.x-dev
Drupal 8.2.7

rajab natshah’s picture

  • RajabNatshah committed 8ad7f7f on 8.x-3.x authored by casey
    Issue #2825785 by casey, othermachines: Views query always queries...
rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem

Committed ... Thank you :)

rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

#3102925: Add an automated testing for the [Google Analytics Reports] and API module

  • Having an optimization round over the code in the module.
  • Adding Drupal-ci automated testing for selected used testing cases
  • Then release an RC or Stable version

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.