Skip to content

call generateUniqueIdentifier once per added file#218

Merged
AidasK merged 2 commits intoflowjs:masterfrom
calzakk:master
Apr 11, 2017
Merged

call generateUniqueIdentifier once per added file#218
AidasK merged 2 commits intoflowjs:masterfrom
calzakk:master

Conversation

@calzakk
Copy link
Copy Markdown
Contributor

@calzakk calzakk commented Apr 10, 2017

addFiles calls generateUniqueIdentifier, but then FlowFile also calls generateUniqueIdentifier. Not a big deal, but an inefficiency nonetheless.

@calzakk
Copy link
Copy Markdown
Contributor Author

calzakk commented Apr 10, 2017

I found this because I was using generateUniqueIdentifier to request a unique identifier from the server, and flow was performing two successive GETs.

Comment thread src/flow.js Outdated
* @type {string}
*/
this.uniqueIdentifier = flowObj.generateUniqueIdentifier(file);
this.uniqueIdentifier = uniqueIdentifier;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BC: please change this line to:
uniqueIdentifier === undefined ? flowObj.generateUniqueIdentifier(file): uniqueIdentifier;

@AidasK AidasK merged commit 5724bd1 into flowjs:master Apr 11, 2017
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.

2 participants