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

Adding a progressbar brings the browser to its knees (CPU Load) #12

Open
slibert opened this issue Apr 15, 2015 · 0 comments
Open

Adding a progressbar brings the browser to its knees (CPU Load) #12

slibert opened this issue Apr 15, 2015 · 0 comments

Comments

@slibert
Copy link

slibert commented Apr 15, 2015

Hello,

As stated in the thread https://vaadin.com/forum#!/thread/3433454 there is some high CPU load that kills the browser if you add a progressbar to a wizard's step.

Here is a snippet code :

private class FirstStep implements WizardStep, ProgressListener
{

    Label lblMessage;
    ProgressBar progress;

    RTWorker worker;
    boolean treatmentDone = false;

    @Override
    public String getCaption() {
        return "Simulation";
    }

    @Override
    public Component getContent() 
    {

        VerticalLayout vLayout = new VerticalLayout();
        vLayout.setWidth(100, Unit.PERCENTAGE);
        vLayout.setMargin(true);
        vLayout.setSpacing(true);

        try
        {

            /* Working Hard */
            worker = new RTWorker(); // Thread

            lblMessage = new Label("Working in progress... ");
            vLayout.addComponent(lblMessage);

            progress = new ProgressBar();
            progress.setVisible(true);
            progress.setWidth(500, Unit.PIXELS);
            progress.setHeight(60, Unit.PIXELS);
            progress.setIndeterminate(false);
            progress.setEnabled(true);
            app.setPollInterval(3000);

            vLayout.addComponent(progress);

}

As you can see, I put a really large poll interval, but still, when running, browser is barely responding to my actions.

Tested with last version of Wizard and Vaadin 7.4.3

Regards
Sebastien

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