`
wenshao
  • 浏览: 271443 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

fastjson发布1.1.1版本

阅读更多
之前的一个版本是1.1.0,1.1.0采用asm和SortFastMatch算法提高性能,由于过于着急展示其优越的性能,没有进行严格测试就发布了。

1.1.1相对于1.1.0,这是一个比较稳定的版本了,行测试覆盖率重新提升到90%以上,build verify testcase 983个。

这个版本进一步完善了asm和SortFastMatch算法,进一步提升了性能,同时补充了大量的testcase,提升了稳定性,我向你推荐使用这个版本,使用这个版本你将会得到令人惊奇的性能。

1.1.1版本的asm来源自objectweb的asm项目,根据fastjson的需要做裁剪,确保引入asm的同时不引起包大小的过渡变大。

为了更好使用sort field martch优化算法提升parser的性能,fastjson序列化的时候,缺省把SerializerFeature.SortField特性打开了。反序列化的时候也缺省把SortFeidFastMatch的选项打开了。这样,如果你用fastjson序列化的文本,输出的结果是按照fieldName排序输出的,parser时也能利用这个顺序进行优化读取。这种情况下,parser能够获得非常好的性能。

我使用github.com/eishay/jvm-serializers/提供的程序做测试,性能数据如下:
|  | 序列化时间 | 反序列化时间 | 大小 | 压缩后大小 |
|java序列化| 8546 | 43199 | 889 | 541|
|hessian| 6643 | 10043 | 501 | 313 |
|protobuf|3008 | 1694 | 239 | 149 |
| thrift | 3182 | 1951 | 349 | 197 |
| avro | 3575 | 2095 | 221 | 133 |
| jackson | 3245 | 2986 | 503 | 271 |
| fastjson | 2292 | 1499 | 468 | 251 |

的是跑的脚本是:
{code}
./run -chart -include=`cat serializers.txt | tr "\\n" ","`  data/media.1.cks
{code}

从上面的数据来看,fastjson的性能已经超越protobuf、thrift、avro这些二进制协议了。一个文本协议的性能超越二进制协议是很难的,我很高兴向你宣布我做到了!!

鉴于fastjson优越的性能表现,我建议做如下事情;
1、替换其他所有的json库,java世界里没有其他的json库能够和fastjson可相比了。
2、使用fastjson的序列化和反序列化替换java serialize,java serialize不单性能慢,而且体制大。
3、使用fastjson替换hessian,json协议不必hessian体积大,而且fastjson性能优越,数倍于hessian
4、把fastjson用于memached缓存对象数据。

h3. How to get it?
If you're Maven user, just use our maven repository(http://code.alibabatech.com/mvn/releases/) with folloging dependency
{code}
<dependency>
     <groupId>com.alibaba</groupId>
     <artifactId>fastjson</artifactId>
     <version>1.1.1</version>
</dependency>
{code}

h3. Downlaods
Source : http://code.alibabatech.com/mvn/releases/com/alibaba/fastjson/1.1.1/fastjson-1.1.1.jar
Binary :http://code.alibabatech.com/mvn/releases/com/alibaba/fastjson/1.1.1/fastjson-1.1.1-sources.jar
Subversion : http://code.alibabatech.com/svn/fastjson/
分享到:
评论
2 楼 yixiandave 2014-03-26  
SortField如何关闭?我输出前是排序过的(和key无关),但是调用JSON.toJSONString()后按key重新排序了
1 楼 tywo45 2011-08-01  
下面这段是1.1.1生成的json串,IE解析不了(同样的内容用1.0.6解析是可以的):{"completed":false,"currentDbName":"BRSCFG_DB","currentTableName":"R_IPDISP","dbCount":5,"dbIndex":5,"exceptionOccured":false,"infoForShow":"","progressIndex":3,"saveResult":0,"synMsgChangeListener":{"dispathComleted":false,"responseList":[{"responseMsg":"ftp mdb sync: recv msg from omc!"},{"responseMsg":"Table: R_FRG_IPDISP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IPV6DISP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_INTERMEDIAIP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_BRSGLOBAL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_MAXCON is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IPPD is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IPDISP4_6_DYNAMIC is a new table, not exist in ZDB !"},{"responseMsg":"Table R_SCTP Field MAXBURST: FieldType isn't compatible,TypeZDB=2,TypeMem=1!"},{"responseMsg":"Table R_SCTP Field MAXBURST: FieldLength 1 is smaller in Mem!"},{"responseMsg":"Table: R_PORTATTIBUTE is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_STATICARP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_BFDAUTH is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_BFDSESSION is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_VPN_VRF is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_VRF_ATTR is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_VRF_RT is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IPGLOBAL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_INICFG is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_DNSSERVER is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_DNSPREFER is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_DNSGLOBAL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_ACL4_NAME is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_ACL4 is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_ACL6 is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_MACL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_STATICNDENTRY is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_NDPREFIX is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_PREFIXDEFAULT is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_MLDGROUP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_TUNNEL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IPV6_INTF is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IPV6_RIM is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_POLICYMAP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_POLICYMAPITEM is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_TUNNELNO is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IKE_POLICY is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IKE_POLICYATTR is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IKE_PSK is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IKE_XCHMODE is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IKE_VERSION is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IKE_GLOBAL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IPSEC_TRANS is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_CRYPTO_MAP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_CRYPTO_MAPITEM is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_RMP_NAME is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_RMP_MATCH_ACL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_RMPPBR_SETIPNH is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_RMPPBR_SETOTH is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IPE1PORT is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_PPPCFG is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_MPCFG is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_FTPS is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_FTPC is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_ETHERNETOAM is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_COMPATCFG is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_VRRP_GROUP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_VRRP_SECONDIP is a new table, not exist in ZDB !"},{"responseMsg":"Table R_INTERFACE Field VRFID: FieldType changed! Zdb: BYTE, Mem: WORD!"},{"responseMsg":"Table R_INTERFACE Field ACL4_NAME_IN does not exist in ZDB!"},{"responseMsg":"Table R_INTERFACE Field ACL4_NAME_OUT does not exist in ZDB!"},{"responseMsg":"Table R_INTERFACE Field CRYPTO_MAP does not exist in ZDB!"},{"responseMsg":"Table: R_DES_BOARDINFO is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_NETCFG is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_LOMP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_NETYPE_DIS is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_APSGROUP is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_APSCHANNEL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_SDHSOHPARA is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_SDHHPPARA is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_SDHLPPARA is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_RPT_RACK is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_RPT_SHELF is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_RPT_BOARDPLUS is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_RPT_DES_BOARDINFO is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_TCPTRANS is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_BOARDCOMPAT is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_N7ISNITR is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_N7CLT is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_LINKMONI is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_CLT is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_R2OFFICE is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_OFFICEEX is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_IUADCHNL is a new table, not exist in ZDB !"},{"responseMsg":"Table R_SUBSYSTEM Field STATUS does not exist in ZDB!"},{"responseMsg":"Table R_MODULE Field STATUS does not exist in ZDB!"},{"responseMsg":"Table R_UNIT Field STATUS does not exist in ZDB!"},{"responseMsg":"Table R_SUNIT Field STATUS does not exist in ZDB!"},{"responseMsg":"Table R_OFFICE Field TAG: FieldType changed! Zdb: BYTE, Mem: DWORD!"},{"responseMsg":"Table R_OFFICE Field CLUSTERID does not exist in ZDB!"},{"responseMsg":"Table R_N7LS Field STATUS does not exist in ZDB!"},{"responseMsg":"Table R_SIGROUTE Field RANGEMODE does not exist in ZDB!"},{"responseMsg":"Table: R_ST is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_ST_DATA is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_PM_GLOBAL is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_PM_DATA is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_ALARM is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_ALARMFILTER is a new table, not exist in ZDB !"},{"responseMsg":"Table: R_OBJECT is a new table, not exist in ZDB !"},{"responseMsg":"Table R_SIUCFG Field SCMEDIALEDNUM: FieldLength 100 is longer in Mem!"},{"responseMsg":"Table R_SIUCFG Field SCMEBLACKSERVICE: FieldLength 12 is longer in Mem!"},{"responseMsg":"Table R_SIUCFG Field SCMEVCSKY: FieldLength 96 is longer in Mem!"},{"dbNum":5,"responseMsg\":\"{'dbNum':5,'type':2,'tFtpSyncResult':[{\"dbName\":\"BRSCFG_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]},{\"dbName\":\"IPCONF_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]},{\"dbName\":\"PLAT_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]},{\"dbName\":\"OAM_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]},{\"dbName\":\"SIU_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]}],"tFtpSyncResult":[{"dbName":"BRSCFG_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]},{"dbName":"IPCONF_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]},{"dbName":"PLAT_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]},{"dbName":"OAM_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]},{"dbName":"SIU_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]}],"ucpad":[0,0,0,0,0,0]}],"saveComleted":false,"syncCompleted":true},"tableCount":100,"tableIndex":100,"zdbSynResponse":{"dbNum":5,"responseMsg\":\"{'dbNum':5,'type':2,'tFtpSyncResult':[{\"dbName\":\"BRSCFG_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]},{\"dbName\":\"IPCONF_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]},{\"dbName\":\"PLAT_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]},{\"dbName\":\"OAM_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]},{\"dbName\":\"SIU_DB\",\"failTblName\":[],\"failTblNum\":0,\"retCode\":0,\"ucpad\":[0,0,0,0]}],"tFtpSyncResult":[{"dbName":"BRSCFG_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]},{"dbName":"IPCONF_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]},{"dbName":"PLAT_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]},{"dbName":"OAM_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]},{"dbName":"SIU_DB","failTblName":[],"failTblNum":0,"retCode":0,"ucpad":[0,0,0,0]}],"ucpad":[0,0,0,0,0,0]}}

相关推荐

    fastjson-1.1.1.jar

    号称最快的json ---Fastjson 纯java实现 号称最快 最新版的

    fastjson-1.1.1-sources.jar

    fastjson 是一个性能很好的 Java 语言实现的 JSON 解析器和生成器,来自阿里巴巴的工程师开发。 主要特点: 快速FAST (比其它任何基于Java的解析器和生成器更快,包括jackson) 强大(支持普通JDK类包括任意Java...

    fastjson-1.1.jar 阿里巴巴

    fastjson 阿里巴巴开发的,号称 解析json速度快。

    json-simple-1.1.1.jar.rar

    `json-simple-1.1.1.jar`是该库的一个版本,包含了所有的类和资源,供Java应用程序直接使用。 在Java中,我们通常使用`json-simple`库来实现以下功能: 1. **序列化对象为JSON字符串**:如果你有一个Java对象,你...

    几个jar包:org.com、fastjson、httpclient、httpcore、jetty-util

    commons-codec-1.6.jar commons-lang-2.6.jar commons-logging-1.1.1.jar fastjson-1.2.15.jar httpclient-4.2.1.jar httpcore-4.2.1.jar jetty-util-9.3.7.v20160115.jar

    java发送邮件依赖包javax.mail.jar和activation.jar.zip

    implementation 'javax.activation:activation:1.1.1' } ``` 发送邮件的基本步骤如下: 1. 创建 `Properties` 对象,设置SMTP服务器的相关属性,如主机名、端口号、用户名和密码。 2. 使用 `Properties` 创建 `...

    Java发送邮件实例及mail.jar包和activation-1.1.jar包.rar

    在Java编程中,发送电子邮件是一项常见的任务,尤其在自动化通知、数据报告或者用户验证等场景中。本实例将深入探讨如何使用`mail.jar`和`activation-1.1.jar`这两个库来实现邮件发送功能。这两个JAR文件是JavaMail ...

    java的邮箱和JSON数据处理jar包

    在给定的压缩包中,我们有三个关键的JAR文件,它们分别是:`javax.mail.jar`、`fastjson-1.2.79.jar` 和 `activation-1.1.1.jar`。这些文件是Java开发者在处理邮件通信和JSON数据解析时不可或缺的库。 首先,`javax...

    json jar包

    com.springsource.org.apache.commons.beanutils-1.7.0 ...com.springsource.org.apache.commons.logging-1.1.1 ezmorph-1.0.6 json-lib-2.4-jdk15 下载后解压文件里面的jar文件

    struts2要用的jar包(仅仅是struts2的jar包 )

    asm-3.3.jar asm-commons-3.3.jar commons-fileupload-1.2.2.jar commons-io-2.4.jar commons-lang3-3.1.jar commons-logging-1.1.1.jar fastjson-1.1.24-20120814.043343-7.jar freemarker-2.3.19.jar jackson-core...

    基于Spring MVC的web框架 1.1.11

    # demoWeb 一个基于SpringMVC的web框架 ...集成Spring Cache,FastJson Spring Cache增加redis缓存实现 Mybatis使用二级缓存,增加redis实现 增加reactJs 增加Mybatis插件pageHelper,Mapper doc内有相关文档

    json用到的jar

    json-lib-2.2.3-jdk15.jar commons-beanutils-1.7.0.jar commons-httpclient-3.1.jar commons-lang-2.3.jar commons-logging-1.1.1.jar commons-collections-3.2.1.jar ezmorph-1.0.3.jar

    一个可以直接运行的基于SpringMVC的web框架1.1.12

    集成Spring Cache,FastJson Spring Cache增加redis缓存实现 Mybatis使用二级缓存,增加redis实现 增加reactJs 增加Mybatis插件pageHelper,Mapper 1.1.12 使用draft富文本编辑器 增加ant design 代码生成器功能增强

    可以直接运行的基于SpringMVC的web框架示例,也可以直接当公司框架

    集成Spring Cache,FastJson Spring Cache增加redis缓存实现 Mybatis使用二级缓存,增加redis实现 增加reactJs 增加Mybatis插件pageHelper,Mapper 1.1.12 使用draft富文本编辑器 增加ant design 代码生成器功能增强

    spring springmvc mybatis 整合jar包

    spring springmvc mybatis的整合jar包,以及mysql,Junit,fastJson等的jar包,导入这些jar包 搭一个SSM的环境,可以使用SSM框架做一个简单的能够实现增删改查的小项目,具体的jar包及其版本如下 : aopalliance-1.0....

    活体检测jar包

    1. **commons-codec-1.6.jar**: 这是Apache Commons Codec库的一个版本,它提供了各种编码和解码算法,包括Base64、Hex、URL编码和电话号码格式化等功能。在活体检测中,可能用于处理和传输图像数据。 2. **commons...

    jt-crawler.zip

    6. **Commons-logging-1.1.1.jar**:Apache Commons Logging是一个日志抽象层,允许在应用程序中使用多种日志框架。在Python项目中,可能通过Jython使用此库来记录爬虫运行过程中的日志信息。 这个项目结合了Python...

    订单管理解决方案(商家版).zip

    4. **commons-logging-1.1.1.jar**:Apache Commons Logging是Java的一个通用日志框架,它允许程序在不改变代码的情况下切换不同的日志实现。在订单管理系统中,这个库用于记录系统运行时的信息,包括错误、警告和...

    json相关jar包.zip

    Json 相关 Jar 包,包括 fastjson-1.1.41.jar,gson-2.2.4.jar,jackson-annotations-2.2.3.jar,jackson-core-2.2.3.jar,jackson-databind-2.2.3.jar,commons-beanutils-1.8.3.jar,commons-collections-3.2.1....

    json-lib-2.4-jdk15以及全部依赖包

    3. `commons-logging-1.1.1.rar`:Apache Commons Logging库的1.1.1版,它提供了一个统一的日志接口,可以透明地使用各种日志框架,如log4j或Java内置的日志系统。`rar`格式在这里可能是误标,通常这类库文件应该是`...

Global site tag (gtag.js) - Google Analytics