Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[WEEX-648][Android]native batch for dom operations generating from JavaScript #1647

Merged
merged 5 commits into from
Nov 5, 2018

Conversation

acton393
Copy link
Member

introduce a native batch for dom operations generating from JavaScript
wrap a series of dom operations with beginBatch and endBatch directives, when every V-sync signal comes, we try to ensure that the operations between beginBatch and endBatch can be performed in current V-sync, this policy can drop frames maybe, for our policy dropping frames, we only allow 20 frames at most.
see iOS pull request #1644

feature:648

…vaScript

introduce a native batch for dom operations generating from JavaScript
wrap a series of dom operations with beginBatch and endBatch directives, when every V-sync signal comes, we try to ensure that the operations between beginBatch and endBatch can be performed in current V-sync, this policy can drop frames maybe, for our policy dropping frames, we only allow 20 frames at most.
see iOS pull request apache#1644

feature:648
@weex-bot
Copy link

weex-bot commented Oct 18, 2018

Fails
🚫 Failed to run assembleDebug task for android.
Messages
📖 android build verification finished.

Generated by 🚫 dangerJS

@@ -118,6 +123,16 @@ public Object callDomMethod(String method, JSONArray args, long... parseNanos) {
}
new UpdateComponentDataAction(mWXSDKInstance, args.getString(0), JSONUtils.toJSON(args.get(1)), args.getString(2)).executeAction();
break;
case BATCH_BEGIN: {
String ref = args.size() >= 1 ? args.getString(0) : null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

args may equals null

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Darin726 thanks, I have checked value for args, just return if null

Copy link
Contributor

@Darin726 Darin726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YorkShen YorkShen merged commit 817f6ef into apache:master Nov 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants