Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Reduce calls to waitForAngular in map function #1784

Closed
smhc opened this issue Feb 5, 2015 · 4 comments
Closed

Reduce calls to waitForAngular in map function #1784

smhc opened this issue Feb 5, 2015 · 4 comments

Comments

@smhc
Copy link
Contributor

smhc commented Feb 5, 2015

The following to query the text for each cell of a table performs a 'waitForAngular' for every cell, which is very slow for a large table.

Is it possible to only call 'waitForAngular' once when invoked via 'map' ? Is there any way to turn off the synchronisation during this iteration? Using 'ignoreSynchronisation=true' doesn't allow turning sync on and off arbitrarily mid test due to the queuing design of web driver.

getTableText = function() {
        return element.all(by.repeater('row in rows')).map(function(rowResults) {
            return rowResults.all(by.repeater('col in cols')).map(function(cellResults) {
                return cellResults.getText();
            });
        });
    };
@juliemr
Copy link
Member

juliemr commented Feb 6, 2015

We can't turn off waitForAngular for all calls to map, since some may modify the page and cause race conditions. We can probably do something to give better control over using ignoreSynchronization though.

@FuturaITLtd
Copy link

Would it be quicker to wait for the table to load then get the data via jquery? That's what we did and it reduced time to read data significantly.

Sent from my iPhone

On 5 Feb 2015, at 01:07, smhc notifications@github.com wrote:

The following to query the text for each cell of a table performs a 'waitForAngular' for every cell, which is very slow for a large table.

Is it possible to only call 'waitForAngular' once when invoked via 'map' ? Is there any way to turn off the synchronisation during this iteration? Using 'ignoreSynchronisation=true' doesn't allow turning sync on and off arbitrarily mid test due to the queuing design of web driver.

getTableText = function() {
return element.all(by.repeater('row in rows')).map(function(rowResults) {
return rowResults.all(by.repeater('col in cols')).map(function(cellResults) {
return cellResults.getText();
});
});
};

Reply to this email directly or view it on GitHub.

@smhc
Copy link
Contributor Author

smhc commented Feb 7, 2015

We can probably do something to give better control over using ignoreSynchronization though.

Yes please. A method to 'queue' the setting for ignoreSynchronization would help address the problem.

@juliemr
Copy link
Member

juliemr commented Mar 18, 2015

See #1939

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants