`
wenshao
  • 浏览: 269734 次
  • 性别: 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速度快。

    几个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发送邮件实例及mail.jar包和activation-1.1.jar包.rar

    使用mail.jar和activation-1.1.jar包发送邮件实例 使用mail.jar和activation-1.1.jar包发送邮件实例

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

    该压缩包中包含了javax.mail.jar和activation.jar两个架包,这是java发送邮件必须要导入的,该资源为免费下载资源,希望可以帮助到需要的小伙伴

    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文件

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

    javax.mail.jar fastjson-1.2.79.jar activation-1.1.1.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....

    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一系列的包

    commons-beanutils-1.8.3.jar commons-collections-3.2.1.jar ...commons-logging-1.1.1.jar ezmorph-1.0.6.jar fastjson-1.1.28.jar json-lib-2.3-jdk15.jar xom-1.0d10.jar commons-logging-api-1.1.jar

    SSH(Spring Struts Hibernate)所有jar包

    2.7.7.jar aopalliance-1.0.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 dom4j-1.6.1.jar druid-1.0.1.jar fastjson-...

    SSH整合rar包【齐全】

    fastjson-1.1.21.jar freemarker-2.3.9.jar gecko-1.1.4.jar geronimo-activation_1.1_spec-1.0.2.jar geronimo-javamail_1.4_spec-1.6.jar geronimo-jta_1.1_spec-1.1.jar geronimo-stax-api_1.0_spec-1.0.1.jar ...

    java开发常用jar包

    fastjson-1.1.37.jar freemarker-2.3.22.jar hibernate-commons-annotations-4.0.1.Final.jar hibernate-core-4.2.0.Final.jar hibernate-jpa-2.0-api-1.0.1.Final.jar jackson-annotations-2.5.0.jar ...

    271个java需要用的jar包

    fastjson-1.1.15.jar freemarker-2.3.19.jar freemarker-2.3.22.jar geronimo-javamail_1.4_spec-1.7.1.jar geronimo-jta_1.1_spec-1.1.1.jar google-collections-1.0.jar google-gxp-0.2.4-beta.jar gson-2.2.4.jar...

Global site tag (gtag.js) - Google Analytics