James Chen

Results 54 comments of James Chen

It should have been fixed in cocos2d-x repo.

@Dimon4eg , could this PR be ready for merge now?

## Tested on MacBook Pro (16-inch, 2019) 2.6GHz 6-Core Intel Core i7 ### NodeJS v16.15.0 ``` james@JamesMPB sia % npm run benchmark > [email protected] benchmark > node benchmark/benchmark.js Downloading the...

### Redmi 5 Plus (Cocos Creator 3.6.1) ``` Running tests on "Tiny file" dist/main.js:8826 Running benchmarks for JSON, 10000 loops dist/main.js:8826 Running benchmarks for Sia, 10000 loops dist/main.js:8826 Running benchmarks...

### iPhoneX (Cocos Creator 3.6.1) ``` 12:46:59 [DEBUG]: D/ JS: Downloading the test data 12:46:59 [DEBUG]: D/ JS: Running tests on "Tiny file" 12:46:59 [DEBUG]: D/ JS: Running benchmarks for...

According to the performance test result, it's better to use `JSON` format for deserializing `JS objects`.

Writing serialization code manually like the following: ```ts public archive (ar: any) { super.archive(ar); ar.archive('_projection', this._projection); ar.archive('_priority', this._priority); ar.archive('_fov', this._fov); ar.archive('_fovAxis', this._fovAxis); ar.archive('_orthoHeight', this._orthoHeight); ar.archive('_near', this._near); ar.archive('_far', this._far); ar.archive('_color', this._color);...

javascript primitive type is value type rather than reference type. How to assign the member variables? Perhaps, just passing owner object to ar function and set the property according property...

I guess the devices those only support OpenGLES2 are in a very low percentage. They're born at least ten years ago and it's really hard to run any games on...