There seems to be a performance difference between using the model->disableLogging() vs activity()->disableLogging(). This seems to stem from the latter only getting checked after the model has already created the activity and tried to log it. Seems like adding a check to the model level to see if activity logging is enabled would address it and make so that the model level doesn't have to do the work if global logging is disabled in the first place.
Hey, thanks for reporting this issue! 馃槉
Are you able / do you want to open a PR and fix it? If not, totally fine!
I should be able to work up something around this. Will give it a shot!
Great! If you need some input, feedback, help or something don't hesitate to ask. 馃槉
So I got back to finally working on fixing this, but I'm having trouble testing the change, as I can't figure out how to mock the anonymous class in the LogsActivityTest to confirm that my chance actually has fixed the performance issue. I've pushed up the PR at least in the fixed state, but would be happy to be able to properly confirm the fix.
how i can disable globaly just in user area ? in admin enable automatilay?
@vahidalvandi I would recommend a middleware that enables/disables logging.