vue-codemirror
vue-codemirror copied to clipboard
Should both camelCaseEvent and lowerCaseEvent be emitted?
VueCodeMirror emits both camelCaseEvent and lowerCaseEvent when the original codemirror event is fired. As most of the events are camel-cased, vue events almost double up.
When making a selection operation, CodeMirror fires too many events in a flash. And VueCodeMirror doubles them. Whether camel case or lower case, it's up to the developer. Most ofter, one of them is chosen as a specification. So, it may just waste half of the calculation.
BTW, when developing with the vue devtool, do some selection with your code and you will find the CPU goes too high because of the event panel tracking the events. Select more frequently, you may very likely get your vue tool crash. However, it is the CodeMirror who should take care of it.

CamelCaseEvent or lowerCaseEvent, it can be a choice, to cut down half of the event calculation. Default to both is ok.