Closed zhongwuzw closed 4 years ago
We don't need to use
SEL
as the_cache
key
, useselectorName
directly. We can prevent duplicate operations if sameSEL
already existed https://github.com/zhongwuzw/dart_native/blob/1e077faeb94b25274e9d45afe0cd24bd75ed5b9b/dart_native/lib/src/ios/runtime/selector.dart#L19-L21 .
This PR will optimize the performance of SEL(String selectorName)
, but it also increase the cost of SEL.fromPointer(Pointer<Void> ptr)
. I think most developers prefer to use SEL(String selectorName)
.
We don't need to use
SEL
as the_cache
key
, useselectorName
directly. We can prevent duplicate operations if sameSEL
already existed https://github.com/zhongwuzw/dart_native/blob/1e077faeb94b25274e9d45afe0cd24bd75ed5b9b/dart_native/lib/src/ios/runtime/selector.dart#L19-L21 .