美团客户端响应式框架 EasyReact

码农软件 · 软件分类 · 网站客户端 · 2019-04-28 13:58:06

软件介绍

EasyReact 是一款基于响应式编程范式的客户端开发框架,开发者可以使用此框架轻松地解决客户端的异步问题。EasyReact 已在美团和大众点评客户端的部分业务中进行了实践,并且持续迭代了一年多的时间。

EasyReact 目前开源的是 iOS Objective-C 语言部分,系统需求:

  • iOS 8.0 +

  • Xcode 8.0 +

特性

注:以下列出的“节点”均指 EZRNode ,即 EasyReact 中对各种值(所有对象类型)的一种统一表示。

对比其他函数响应式库

EasyReact、ReactiveCocoa、RxSwift 常见API 基于耗时的 Benchmarking

测试环境

编译平台: macOS High Sierra 10.13.5

IDE: Xcode 9.4.1

真机设备: iPhone X 256G iOS 11.4(15F79)

测试对象

  1. listener, map, filter, flattenMap 等单阶操作

  2. combine, zip, merge 等多点聚合操作

  3. syncWith 操作

其中测试的规模基于操作对象个数10,触发次数1000。如 Listener 方法有10个监听者,重复触发发送值的行为1000次。 时间单位为ns。

测试数据

重复上面的实验10次,得到数据平均值如下:

结果总结

基于 Objective-C 语言实现的 EasyReact 和 ReactiveCocoa :

ReactiveCocoa 平均耗时是 EasyReact 的 725.41%

EasyReact 的 swift 版本即将开源,届时会和 RxSwift 进行 benchmark 的比较。 

本文地址:https://www.codercto.com/soft/d/4572.html

Writing Windows VxDs and Device Drivers, Second Edition

Writing Windows VxDs and Device Drivers, Second Edition

Karen Hazzah / CMP / 1996-01-12 / USD 54.95

Software developer and author Karen Hazzah expands her original treatise on device drivers in the second edition of "Writing Windows VxDs and Device Drivers." The book and companion disk include the a......一起来看看 《Writing Windows VxDs and Device Drivers, Second Edition》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

MD5 加密
MD5 加密

MD5 加密工具