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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰馃Antler engine measurements don't finish #2473

Closed
rrelmy opened this issue Dec 16, 2019 · 1 comment
Closed

馃悰馃Antler engine measurements don't finish #2473

rrelmy opened this issue Dec 16, 2019 · 1 comment

Comments

@rrelmy
Copy link

@rrelmy rrelmy commented Dec 16, 2019

Describe the bug
The measurements done by the Antlers engine are not stopped in the happy path where content is returned. Only when an exception happens

To Reproduce
Steps to reproduce the behavior:

  1. Enable the DebugBar
  2. Check the debugbar, most of the Tag: * bars go until the end
  3. Apply the patch 馃し鈥嶁檪
  4. Check the debugbar again

Expected behavior
Measurements should be correct I suppose 鈥

Screenshots
Instead of a screenshot here is a patch

Index: statamic/core/View/Antlers/Engine.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- statamic/core/View/Antlers/Engine.php	(revision cd5662d3f31558bbc832d7f790b8cd3168a53188)
+++ statamic/core/View/Antlers/Engine.php	(date 1576533918048)
@@ -173,8 +173,8 @@
             throw $e;
         } catch (\Exception $e) {
             throw $e;
-        }
-
-        stop_measure($tag_measure);
+        } finally {
+            stop_measure($tag_measure);
+        }
     }
 }

Environment details (please complete the following information):

  • Statamic Version: 2.11.15
@jackmcdade

This comment has been minimized.

Copy link
Member

@jackmcdade jackmcdade commented Jan 9, 2020

Nice one, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can鈥檛 perform that action at this time.