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

Efficiency of bindList with many items #77

Closed
g105b opened this issue Aug 1, 2019 · 0 comments
Closed

Efficiency of bindList with many items #77

g105b opened this issue Aug 1, 2019 · 0 comments

Comments

@g105b
Copy link
Member

g105b commented Aug 1, 2019

Rather than cloning the template element for each iteration, create a fragment to output to, then append the fragment to the page.

Appending to the DOM is a relatively costly function, but appending to a fragment is not.

g105b added a commit that referenced this issue Aug 5, 2019
g105b added a commit that referenced this issue Aug 8, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Improvements to efficiency

* Only attempt to append fragment if template parent exists

* Only bind parameters that are market for binding

* Update deps

* Test data-bind-parameters usage
@g105b g105b closed this as completed Aug 28, 2019
g105b added a commit that referenced this issue Sep 1, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Add test for #84

* Implement boolean attribute binding
closes #84
g105b added a commit that referenced this issue Sep 16, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Return number of iterations

* Quick implementation, closes #90. Wraps existing functionality.
Requires refactoring to include all functionality within bindList

* Update dependencies
g105b added a commit that referenced this issue Sep 18, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Remove unbindable check

* Allow returning any iterable, not just array - fixes #88

* Implement and test bind* function with get* kept for compatibility
Closes #89
g105b added a commit that referenced this issue Sep 19, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Remove unbindable check

* Allow returning any iterable, not just array - fixes #88

* Implicit binding on bindData
g105b added a commit that referenced this issue Oct 21, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Remove unbindable check

* Allow returning any iterable, not just array - fixes #88

* Test that multiple kvps can be bound within the same parameter

* Rename tests

* Isolate and fix bug binding multiple parameter placeholders
g105b added a commit that referenced this issue Nov 25, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Remove unbindable check

* Allow returning any iterable, not just array - fixes #88

* Test that multiple kvps can be bound within the same parameter

* Tidy binding non-iterable data

* Only output t- prefix on named templates

* Update to dom v2.1.5
g105b added a commit that referenced this issue Nov 27, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Remove unbindable check

* Allow returning any iterable, not just array - fixes #88

* Test that multiple kvps can be bound within the same parameter

* Isolate bug for #105 - use README example

* Rename BindDataGetter -> BindObject

* Tidy up bindData function

* Test incompatible bindData types

* Remove bindNestedList function

* Testing bindValue

* Test bindObjectValue

* Test bindValue within lists

* Bindable type checking

* Simplify bind functions, closes #110

* Skip empty lists
g105b added a commit that referenced this issue Nov 28, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Remove unbindable check

* Allow returning any iterable, not just array - fixes #88

* Test that multiple kvps can be bound within the same parameter

* Treat nullable iterable as empty list

* Update dependencies
g105b added a commit that referenced this issue Dec 11, 2019
* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Remove unbindable check

* Allow returning any iterable, not just array - fixes #88

* Test that multiple kvps can be bound within the same parameter

* Remove unused functions

* Extract templates after expanding components. Closes #105
g105b added a commit that referenced this issue Jan 15, 2020
)

* Fix return type for getElementById, closes #65

* Update PHPDoc to include inherited changes

* Rename function for removing template attributes

* Set value for certain input fields differently

* Bind list to document fragment for efficiency
for #77

* Remove unbindable check

* Allow returning any iterable, not just array - fixes #88

* Test that multiple kvps can be bound within the same parameter

* Add failing test for #124

* Empty element's child nodes when binding empty dataset
Closes #124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant