Projects > cpp > Issues > Refactor #2247

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Using functions instead of macros to speeding up building for JSB project

Refactor #2247 [Closed]
dumganhar 2013-06-03 14:22 . Updated over 3 years ago

JS_NEW_PROXY —> jsb_new_proxy
JS_GET_PROXY —> jsb_get_native_proxy
JS_GET_NATIVE_PROXY —> jsb_get_js_proxy
JS_REMOVE_PROXY —> jsb_remove_proxy

Since the implementation of JS_XXX macros are using UTHASH which is also implemented by marcos totally,
it will expand jsb_cocos2dx_auto.cpp to a very huge state when compiling which makes the compilation very slow.
On android, just building jsb_cocos2dx_auto.cpp and jsb_cocos2dx_extension_auto.cpp will take 5 minutes.
After these changes, it takes only 2 minutes, it means that, we can save about more than half time than before.

dumganhar 2013-06-04 03:17
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:a2e9fb0a8c8785c48b77852b35a99ba4f85cfbfe.

dumganhar 2013-06-04 05:04
  • Description updated (diff)

Atom PDF

Start date:2013-06-03
Due date:
% Done:


Target version:2.1.4

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.