Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[TwigBundle] Created stopwatch tag for profiling templates#8719

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 5 commits intosymfony:masterfromfabpot:twig-stopwatch-helper
Aug 13, 2013

Conversation

fabpot
Copy link
Member

QA
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#7953
LicenseMIT
Doc PRsymfony/symfony-docs#2630

This PR is the continuation of#7953

This PR adds a new tag to Twig which you can use to time parts of a template and see it in the timing tab of the profiler.

Usage:

{%stopwatchfoo%}... some things that gets timed{%endstopwatch%}

@fabpot
Copy link
MemberAuthor

The main differences with the original PR are:

  • I have removed the code that checks is stopwatch is available as the check is already done during compilation
  • I have removed the check for names that was already used as it is not needed (the stopwatch knows how to deal with such cases).

@fabpot
Copy link
MemberAuthor

I've made further modifications:

  • The stopwatch name can now be any valid expression (more consistent with the other Twig built-in tags)
  • I've removed the possibility to add the name after endstopwatch (because of the previous change and also for more consistency)

fabpot added a commit that referenced this pull requestAug 13, 2013
This PR was merged into the master branch.Discussion----------[TwigBundle] Created stopwatch tag for profiling templates| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#7953| License       | MIT| Doc PR        |symfony/symfony-docs#2630This PR is the continuation of#7953This PR adds a new tag to Twig which you can use to time parts of a template and see it in the timing tab of the profiler.Usage:````jinja{% stopwatch foo %}... some things that gets timed{% endstopwatch %}````Commits-------29a58e7 change the stopwatch argument to be any valid expression4590974 removed code that prevents the stopwatch to work properly2f67776 removed unneeded safeguard as it's already done during compilationbbad387 fixed CSf39ed57 Created stopwatch tag
@fabpotfabpot closed thisAug 13, 2013
@fabpotfabpot merged commit29a58e7 intosymfony:masterAug 13, 2013
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@fabpot@wouterj

[8]ページ先頭

©2009-2025 Movatter.jp