Skip to content

Commit aeffa5f

Browse files
committed
mvp模式第五篇文章修改
1 parent f66c313 commit aeffa5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_posts/2018-05-09-MVP模式探索——Presenter和View解耦的尝试之APT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ tags:
1313
- 架构模式
1414
---
1515

16-
#前言
16+
# 前言
1717

1818

1919
在前一篇文章[《MVP模式探索-Presenter和View解耦的尝试》](https://ykbjson.github.io/2018/04/17/MVP%E6%A8%A1%E5%BC%8F%E6%8E%A2%E7%B4%A2-Presenter%E5%92%8CView%E8%A7%A3%E8%80%A6%E7%9A%84%E5%B0%9D%E8%AF%95/)里,我在文章末尾说到了该解耦方式有几个已知的问题,其中一个就是用反射的方式去执行方法会有性能上的损耗,但是可以用APT技术替代反射的方式。后来我去查了一下反射性能损耗的问题,发现反射出现性能损耗是有一定条件的,那就是需要在反复多次执行同一个反射调用时,当反复执行的次数达到一个数量级后,才会和普通调用产生性能差异。然而像MMVP模式里的那些反射执行的方法,并不会在短时间内反复多次调用,所以其实并不存在什么性能上的问题。

0 commit comments

Comments
 (0)