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

Thousands of bootstrap-switch: Forced reflow is a likely performance bottleneck. #718

Open
leoplct opened this issue Dec 24, 2019 · 0 comments

Comments

@leoplct
Copy link

leoplct commented Dec 24, 2019

I have thousands of bootstrap-switch as table row, like code below.
It's very expensive too load and if I see on ChromeDevTool (performance) I can see:
Warning Forced reflow is a likely performance bottleneck.

How can I make it faster? The time spent for rendering is too much and it breaks the page.

$("input[data-toggle='toggle']").bootstrapSwitch({
        onSwitchChange:function(event, state) {
            $(this).parents('form').trigger('change')
        }
    });

Table with +1.000 rows

<table>
<thead>...</thead>
<tbody>
  <tr>
     <td>
           <form action="...:">
               <input type="checkbox" data-toggle="toogle"/>
             </form>
   </td>
  </tr> 
</table>
@leoplct leoplct changed the title Forced reflow is a likely performance bottleneck. Thousands of bootstrap-switch: Forced reflow is a likely performance bottleneck. Dec 24, 2019
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

No branches or pull requests

1 participant