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

Tracker optimizations #7711

Merged
merged 7 commits into from Apr 21, 2015
Merged

Tracker optimizations #7711

merged 7 commits into from Apr 21, 2015

Conversation

diosmosis
Copy link
Member

Refs #7640

This pull request sets the logger used in the tracker to the NullLogger, unless [Tracker] debug is set to 1.

Also includes the following changes:

  • There is now a dedicated tracker DI config environment.
  • ContainerFactory now allows plugins to have environment related config, eg, plugins/Monolog/config/tracker.php.
  • There are some tweaks to profiler setup so profiling results are more accurate (things like not accessing StaticContainer from within the profiler setup methods and not accessing SettingsPiwik::getPiwikUrl until after a run is done).
  • Also includes an update to php-di in composer.lock. Can revert if needed.

Here is a profiling run of the tracker w/ these changes: https://blackfire.io/profiles/6a5f3c65-cbf5-48c9-99d3-c28faaedb38a/graph

diosmosis added 5 commits April 19, 2015 21:49
@diosmosis diosmosis added the Needs Review PRs that need a code review label Apr 20, 2015
@diosmosis diosmosis added this to the Piwik 2.13.0 milestone Apr 20, 2015
@@ -6,9 +6,11 @@

return array(

'Psr\Log\LoggerInterface' => DI\object('Monolog\Logger')
'Monolog\Logger' => DI\object('Monolog\Logger')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a detail but FYI this is the same as 'Monolog\Logger' => DI\object() (no need to fix)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know, wouldn't have guessed that!

@mnapoli
Copy link
Contributor

mnapoli commented Apr 20, 2015

👍 looks good

@diosmosis diosmosis removed the Needs Review PRs that need a code review label Apr 21, 2015
diosmosis added a commit that referenced this pull request Apr 21, 2015
Refs #7640, optimize tracker by making sure production tracker does not use a real logger. Includes change to ContainerFactory that allows plugins to provide environment specific DI config & introduces the tracker.php DI environment. Moved logging related config in cli.php environment config to Monolog container. Also has update to php-di.
@diosmosis diosmosis merged commit e29f364 into master Apr 21, 2015
@diosmosis diosmosis deleted the 7640_tracker_optimizations branch April 21, 2015 01:24
@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Apr 21, 2015
@mattab mattab changed the title 7640 tracker optimizations Tracker optimizations Apr 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants