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
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

casey created an issue. See original summary.

casey’s picture

Status: Active » Needs review
FileSize
989 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

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.