Open confuser opened 8 years ago
I see what you mean -- most of those are require statements (so they're only blocked on file I/O) although some of them call into Java code inside Edge. Did you have a specific problem with one of these, or is it more of a general observation?
I'm fairly new to the apigee platform, however as a Node.js developer, when I see code like that, alarm bells start ringing. It was more of a general observation, especially if Apigee ever allow running of native Node.js under v8, it will cause problems in the future.
https://github.com/apigee/apigee-access/blob/master/lib/index.js#L208 https://github.com/apigee/apigee-access/blob/master/lib/index.js#L217 https://github.com/apigee/apigee-access/blob/master/lib/index.js#L220 https://github.com/apigee/apigee-access/blob/master/lib/index.js#L233 https://github.com/apigee/apigee-access/blob/master/lib/index.js#L239 https://github.com/apigee/apigee-access/blob/master/lib/index.js#L245
Calling
getVault
getQuota
etc, all block the main process, the first time they're called.If this is intentional, then can this please be documented, alongside an explanation, as blocking the event loop like this without any warning is unnerving.