投影片講解視訊影片網址:
http://www.youtube.com/playlist?list=PLFL0ylDooClTXfy-cFbq7rV1iwP57JFaF
This slide is made by the RoBoard team of DMP Electronics Inc.:
https://www.facebook.com/roboard.fans
投影片講解視訊影片網址:
http://www.youtube.com/playlist?list=PLFL0ylDooClTaryk1IPAvDsqsFQ85-Rd1
This slide is made by the RoBoard team of DMP Electronics Inc.:
https://www.facebook.com/roboard.fans
投影片講解視訊影片網址:
http://www.youtube.com/playlist?list=PLFL0ylDooClTaryk1IPAvDsqsFQ85-Rd1
This slide is made by the RoBoard team of DMP Electronics Inc.:
https://www.facebook.com/roboard.fans
Building a server to manage high concurrent connections is non-trival task. For those developers that use ActionScript 3 to build games on the client side it means having a totally different skillset. Being able to use ActionScript 3 on the server to build MMO’s or port client code to the server allows developers to leverage their skills on the server.
By walking through a live game example with more then 15,000 concurrent connections running on a medium Amazon EC2 server the presentation will:
1. Introduce Linux server configuration for high concurrent connected usage.
2. Introduce Socket class based on libev library for high concurrent connection.
3. Introduce leveraging Tamarin project for ActionScript 3 on the server.
This document discusses the benefits of using the Ruby on Rails (ROR) web framework. Some key points made include:
- ROR allows developers to build applications faster and with less code compared to other frameworks like Java.
- ROR follows conventions that reduce configuration needs and promote rapid development.
- A live demo shows how to create a basic blog application in Rails in just 15 minutes.
- ROR is well-suited for building RESTful and agile web applications.
- The Shanghai Ruby on Rails user group helps promote Rails adoption in China through meetups and conferences like RubyConfChina.
The document discusses developing a Flash prototype. It includes sections on Flash, prototype definitions, and mentions several tools that can be used including MockFlow, Balsamiq Mockups, Arduino, Ideum 100, Wii, and Ultimarc. The document was created by Jimmy and provides his contact information.
2. An Introduction to AVM2 & AS3.0 OptimizationAVM2虚拟机介绍对AS3进行性能分析{AgendaAS3代码优化启发对AVM2进行扩充和改造Demos
3. An Introduction to AVM2 & AS3.0 OptimizationAVM2 虚拟机从Flash Player 9.0开始引入,用于AS3.0代码的解释和二进制翻译执行。采用JIT/Interpret混合执行,大幅提高运行效率AS3比AS1/2运行速度提升~10x内建对XML, Array类型的处理支持已经开源: Tamarin ProjectIIntroduction to AVM2
4. An Introduction to AVM2 & AS3.0 OptimizationFlash FrameworkSWF files.ABC ( Actionscript Byte Code)ActionScript RuntimeFlash PlayerAVM1/AVM2OS
5. An Introduction to AVM2 & AS3.0 Optimization研究AVM2的目的与意义了解AVM2实现和工作特性对AS3执行效率的影响
17. An Introduction to AVM2 & AS3.0 OptimizationJIT V.S. Interpret同一段代码在第一次JIT时往往花费的时间较长代码翻译比较耗时当再次执行这段代码后,VM将直接调用先前的翻译结果,速度提高。Interpert对同一段代码均具有大致相同的执行速度。JIT并非性能总优于Interpret:运行时间InterpretJIT执行次数JIT触发阈值
18. An Introduction to AVM2 & AS3.0 OptimizationAVM2的JIT策略对JIT阈值的选择:没有传统的热点(Hotspot)检测机制
47. 收费?An Introduction to AVM2 & AS3.0 OptimizationActionScript的静态分析对编译器产生的abc字节码进行分析,评估代码的执行效率。private function cse_testing(x:int):int{vara:int, b:int; a = x + 10; b = x + 10; return a;}
48. An Introduction to AVM2 & AS3.0 OptimizationActionScript的静态分析 – mxmlc优化性能分析目前的mxmlc(flex sdk 4.0.0 build 14159)似乎不存在实质的代码优化private function cse_testing(x:int):int{vara:int, b:int; a = x + 10;b= x + 10; return a;}共用子表达式无用变量(死码)a=x+10b=x+10* 采用优化模式、非debug版本编译
49. An Introduction to AVM2 & AS3.0 OptimizationActionScript的静态分析 – mxmlc优化性能分析目前的mxmlc(flex sdk 4.0.0 build 14159)似乎不存在实质的代码优化
53. e.g. var a = // Very Slow Operation (no function call)var b = // Very Slow Operation (no function call)return a; //b的动作完全是无效果的JIT的启动阶段将消耗更多时间。代码优化比较耗时
66. 采用未公开的-o2编译选项开关,可能不稳定An Introduction to AVM2 & AS3.0 OptimizationActionScript的静态分析 – AS3优化编译器ASCprivate function cse_testing(x:int):int{vara:int, b:int; a = x + 10;b= x + 10; return a;}
67. An Introduction to AVM2 & AS3.0 OptimizationActionScript的动态分析 – Code Tracing 和 ProfilingFlashPlayer提供了mm.cfg文件供开发者开启虚拟机的代码跟踪和性能分析:
77. An Introduction to AVM2 & AS3.0 OptimizationActionScript的动态分析举例 – 分析Flash启动机制和JIT规律结论:构造函数也会被JIT翻译,仅静态构造函数会被解析执行。图中演示了$cinit和构造函数执行相同的benchmark的性能表现
78. An Introduction to AVM2 & AS3.0 OptimizationActionScript的动态分析举例 – 分析Flash启动机制和JIT规律JIT将对连续整形变量相加失效*abb = a + a + a;b = int(a+a) + a;getlocal1getlocal1add //不存在convert_i, JIT不做整数优化getlocal1add //convert_i存在, 但前一次结果为Numberconvert_isetlocal2findpropstrictint //额外函数调用getlocal1getlocal1addcallpropertyint (1)getlocal1addconvert_isetlocal2b = a + a;b += a;getlocal1getlocal1addconvert_isetlocal2getlocal2getlocal1addconvert_isetlocal2c用时: a(15ms) > b(5.8ms) > c(5ms)
79. An Introduction to AVM2 & AS3.0 Optimization分析AVM2实现(Tamarin)进行AS3代码优化举例
96. 使用Alchemy和Haxe*An Introduction to AVM2 & AS3.0 OptimizationActionScript的增强 – AS3C允许内联ABC汇编或者进行代码替换。e.g. 简单但高效的整数相加 (目前编译器优化不理想)public function Main(){varsrc:int;src = 1; __asm( Op.getLocal1();Op.pushInt(10);Op.addInt(); Op.setLocal1(); );}
97. An Introduction to AVM2 & AS3.0 Optimization对AVM2的定制Red-Tamarin扩充Tamarin对底层资源的访问:Socket,文件、图形、C++类调用Goalthe short goal of the project is to provide most of the C standard library (ANSI and POSIX) to an ActionScript environment.
98. the medium goal is to provide specialized libraries to use sockets or database like SQLite etc.
99. the long term goal is to provide a native API that replicate some part of the Flash Player and Adobe Integrated Runtime (AIR) APIIIIAVM2 Mod
100. An Introduction to AVM2 & AS3.0 OptimizationAVM2 定制 – 增加自己的Native Class利用Tamarin的nativegen.py实现AS代码调用C++类函数
101. 实例:简易的AS3 OpenGL库An Introduction to AVM2 & AS3.0 OptimizationAVM2 定制 – 打包并发布成可执行文件使用asc.jar的-exe参数可以将指定的as脚本编译并和AVM2虚拟机打包成一个可执行文件。An Introduction to AVM2 & AS3.0 OptimizationAVM2 定制 – DEMOAS3版本的Fmod和OpenglAn Introduction to AVM2 & AS3.0 OptimizationAVM2 定制 -- RedTamarinE.g. Actionscript3 driving that hardware accelerated 3d enginehttp://labs.influxis.com/?tag=avm2200 fps3D Engine: IrrlichtC++ Hosting