bdelacretaz commented on a change in pull request #8:
URL: 
https://github.com/apache/sling-org-apache-sling-scripting-core/pull/8#discussion_r665118859



##########
File path: 
src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java
##########
@@ -732,7 +732,14 @@ Bindings verifySlingBindings(final SlingBindings 
slingBindings) throws IOExcepti
 
             ProtectedBindings protectedBindings = new 
ProtectedBindings(bindings, protectedKeys);
             for (BindingsValuesProvider provider : bindingsValuesProviders) {
+                long start = System.nanoTime();
                 provider.addBindings(protectedBindings);
+                long stop = System.nanoTime();
+                if (stop-start > (1000*1000)) { // 1 ms

Review comment:
       it would be good to use a named constant for this value, also to avoid 
duplicating it in the ScriptContextProvider




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to