快速思考紧凑的框架 [英] Fast reflection on compact framework

查看:71
本文介绍了快速思考紧凑的框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人在紧凑型框架上进行了快速反射吗?

解决方案

缓存确实是在紧凑型框架上实现快速"反射的最佳选择.

有一些技巧可以提高反射效果.它们基于这样一个事实,即反射方法比其他方法慢,并且可以将其视为缓存:您创建了包含已反射成员的冗余元数据,以避免重复调用反射方法.在理想情况下,仅重复调用方法(在JSON序列化的情况下,这是不可避免的:最终您需要创建实例).

—SA


Anyone done fast reflection on compact framework?

解决方案

Caching is really your best bet to achieve ''fast'' reflection on the compact framework.


There are several tricks to improve reflection. They are based on the fact that reflection methods are slower than some other and can be considered as caching: you create redundant meta-data which holds already reflected members, to avoid repeated calls to reflection methods. In ideal case, only invocation methods are calls are repeated (in case of JSON serialization, after all, it is unavoidable: eventually you need to create instances).

—SA


这篇关于快速思考紧凑的框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆