Nick,
In your handler, just add that method in to this configuration in your handler:
this.aroundhandler_except = "myAction"
That will exempt that method from the aroundHandler() actions: http://coldbox.ortusbooks.com/content/event_handlers/handler_interception_methods.html . If you have preHandler and postHandler methods you can also use this.prehandler_except
and this.posthandler_except
as well.
If you are running in to this in development, you may want to trying the framework in production mode before you exempt the method, though. There will be a significant increase in performance once you let Coldbox “go live”.
HTH,
Jon
On November 3, 2015 at 8:22:47 PM, Nick (ni...@devx.co.nz) wrote:
Is it possible to disable or bypass the event handler for specific entities that don't need to be injected with anything by Wirebox?I have an entity that's frequently being loaded in bulk (1000+) and it's very slow with eventHandling turned on - it takes about 6-7 seconds to load 2000 objects, each and every time. With eventHandling turned off it only takes less than 2.5 seconds on the first load, but it quickly reduces to less than 100ms on subsequent loads.
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/90cb9c96-3b79-4c5a-9506-fc7c688c5f67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/ba847547-6ce4-49cf-885c-8d30de888e62%40googlegroups.com.
One other note: one way to bypass event handling somewhat is to use a criteria query in lieu of loading the objects through their ORM mappings. When dealing with large recordsets, criteria queries are much, much faster and allow more optimization.
e.g:
var criteria = getModel("Friends").newCriteria();
criteria.add(
criteria.restrictions.isEq("Person",getModel("Person").get(id))
);
var friends = criteria.list();
is exponentionally faster, the larger the relationship set, than:
var friends = getModel("Person").get(id).getFriends();
HTH,
Jon
--------- Original Message ---------
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/etPan.56397284.7681bd88.55a%40jonclausen-mbp.local.