Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: redesign flutter widget elements support. #58

Merged
merged 159 commits into from
Nov 22, 2022
Merged

Conversation

andycall
Copy link
Member

@andycall andycall commented Sep 28, 2022

  1. Flutter Widget Inspector now can inspect all custom elements.
  2. Perfect lifecycle match between Flutter Widgets and WebF Elements.

image

  1. Optimize WidgetElement property and method query performance.

The performance problems

This patch will ignore to pass properties when it's not defined in WidgetElements.

let startTime = Date.now();
let sampleElement = document.createElement('flutter-widget-element');
let obj =  { complex: true }; // This is a complex data object.
for(let i = 0; i < 10000; i ++) {
  sampleElement._cachedData = obj; // The "_cachedData" is not defined on Dart side. But it still takes time and sends to Dart. 
}
console.log(Date.now() - startTime);

@andycall andycall changed the title Fix/custom elements [WIP]: Fix/custom elements Sep 28, 2022
@andycall andycall changed the title [WIP]: Fix/custom elements Fix/custom elements Sep 28, 2022
bridge/CMakeLists.txt Outdated Show resolved Hide resolved
bridge/core/html/forms/html_input_element.d.ts Outdated Show resolved Hide resolved
bridge/polyfill/src/test/index.js Outdated Show resolved Hide resolved
integration_tests/specs/dom/elements/input.ts Show resolved Hide resolved
webf/lib/src/html/a.dart Outdated Show resolved Hide resolved
@andycall andycall merged commit 8ac12c1 into main Nov 22, 2022
@andycall andycall deleted the fix/custom-elements branch June 7, 2023 06:37
looseyi pushed a commit that referenced this pull request May 29, 2024
[fix][NEZ][1.75.0] rename showErrorPage to reportError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants