profile
viewpoint
Daniel Cohen Gindi danielgindi Self Employed, CTO at eyedo fielding technologies ltd. Israel

danielgindi/Charts 23307

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.

danielgindi/ChartsRealm 109

A Realm.io module for Charts

danielgindi/app-redirect 28

Handles redirecting to the native app / app store on iOS and Android

danielgindi/android-helpers 26

A collection of helper classes for android

danielgindi/android-httprequest 4

A chainable HttpRequest/Response library for Android.

danielgindi/DGBarcodeView 3

Barcode view for iOS / ObjC

danielgindi/DGBlockThrottle 3

A little utility to throttle calls to a block in ObjC

danielgindi/DGButton 3

A UIButton subclass with support for more customization, including RTLing image position (iOS / ObjC)

danielgindi/android-vision 2

Sample code for the Android Mobile Vision API.

danielgindi/dg.Utilities 2

A collection of utilities in all kinds of areas

push eventdanielgindi/SequelNet

Daniel Cohen Gindi

commit sha 414884e0c7790105e9c7fa48087aaa322261b2fb

Removed some ambiguous Where overloads

view details

Daniel Cohen Gindi

commit sha 00c25db073ebb219edb5a0817f75dad8a4b8771f

3.0.51

view details

push time in 2 days

created tagdanielgindi/SequelNet

tag3.0.51

SQL abstraction/generalization/protection layer.

created time in 2 days

MemberEvent
MemberEvent

pull request commentexpressjs/compression

Added support for brotli ('br') content-encoding

@danielgindi Thanks for all your work on this. Let me know if you'd like any assistance on addressing the latest issue @dougwilson reported. I'm happy to help where I can.

Well if you want to make the explicit quality indicator take precedence, then by all means... :) I'm kind of busy right now and only reprioritized these because @dougwilson insisted that he does not see any any effect with current browsers.

I'll give you permissions to the repo, so you can complicate things as you wish! ;)

danielgindi

comment created time in 4 days

push eventdanielgindi/rollup-plugin-natives

Daniel Cohen Gindi

commit sha 5d3ccf7407b86be522175aa5d5d9843290e7404f

0.6.0

view details

push time in 5 days

pull request commentdanielgindi/rollup-plugin-natives

missingMapper function

@aminya Could you please treat the reviewed issues and rebase on master?

aminya

comment created time in 5 days

push eventdanielgindi/rollup-plugin-natives

Daniel Cohen Gindi

commit sha 59fadae243a893011d365fab08135ad39c066260

[chore] added eslint and cleaned up

view details

Daniel Cohen Gindi

commit sha 168c9eac794c2da18875fff6e487cd76153db4b9

[docs] typos in README

view details

Daniel Cohen Gindi

commit sha 8e8dfff8d32ed87b1fc41a36dd27f368d4f2567d

[chore] some more cleanup

view details

push time in 5 days

push eventdanielgindi/rollup-plugin-natives

Sylvester Keil

commit sha 3d8fc0a6885933f0f37091650bdca8bac4ebfc59

Use MagicString for SourceMap generation

view details

Sylvester Keil

commit sha 59310400de378e765de0bf2c688cf70d745b3a9b

Update package-lock

view details

Sylvester Keil

commit sha 2e622ad9a2c4942bc3c65e8bec1e3821760c6252

Generate sourcemap in transformer

view details

Daniel Cohen Gindi

commit sha add187069760034a74460b87060847258c59a979

Merge pull request #6 from inukshuk/feature/sourcemap Generate sourcemap

view details

push time in 5 days

PR merged danielgindi/rollup-plugin-natives

Generate sourcemap

Thanks for this plugin! This PR adds support for generating sourcemaps (can be disabled by setting the sourcemap / sourceMap option to false).

Without this, the sourcemap generated by Rollup is broken when using the plugin.

+77 -9

1 comment

4 changed files

inukshuk

pr closed time in 5 days

pull request commentdanielgindi/rollup-plugin-natives

Generate sourcemap

Thanks! :-)

inukshuk

comment created time in 5 days

push eventdanielgindi/rollup-plugin-natives

Christopher Stumph

commit sha 289069006fc5a93d7251c054e4b2b8ad7c5bde55

Allow creation of recursive directories

view details

Daniel Cohen Gindi

commit sha 3b06aab40c75efa33d48ecd06a6bdd21893ca6f9

Merge pull request #7 from cstumph/master Allow creation of recursive directories

view details

push time in 5 days

PR merged danielgindi/rollup-plugin-natives

Allow creation of recursive directories

I noticed this was erroring when I wanted the plugin to generate sub-directories in the dist folder of my bundle config.

src/origin-response.js → dist/origin-response/index.js...
[!] (plugin rollup-plugin-natives) Error: ENOENT: no such file or directory, copyfile '/Users/christopherstumph/Repos/image-resizer/node_modules/sharp/build/Release/sharp.node' -> 'dist/origin-response/libs/sharp.node'
Error: ENOENT: no such file or directory, copyfile '/Users/christopherstumph/Repos/image-resizer/node_modules/sharp/build/Release/sharp.node' -> 'dist/origin-response/libs/sharp.node'
    at Object.copyFileSync (fs.js:1800:3)
    at Object.resolveId (/Users/christopherstumph/Repos/image-resizer/node_modules/rollup-plugin-natives/src/index.js:186:24)
    at /Users/christopherstumph/Repos/image-resizer/node_modules/rollup/dist/shared/rollup.js:18270:25

Config for reference:

{
  input: 'src/origin-response.js',
  output: {
    file: 'dist/origin-response/index.js',
    format: 'cjs',
    exports: 'named'
  },
  plugins: [
    nativePlugin({
      copyTo: 'dist/origin-response/libs',
      destDir: './libs',
      dlopen: false,
    }),
    commonjs({exclude: '*.node'}),
    nodeResolve(),
    json(),
    analyze({ onAnalysis, skipFormatted: false }),
  ],
}
+1 -1

1 comment

1 changed file

cstumph

pr closed time in 5 days

pull request commentdanielgindi/rollup-plugin-natives

Allow creation of recursive directories

Thanks!

cstumph

comment created time in 5 days

issue commentrollup/plugins

Adding support for full ES-Node interop

I think that a "preset" would be nice. Plugins should not imply each other - as in some situations they could make a lot of mess when unintended - and the dev will have a hard time disabling "implied" stuff.

In my opinion a preset is definitely the way to go. But that's a concept yet to be introduced to rollup.

Another note - one of the things I love about rollup is that it encourages transitioning to static imports and teaches its benefits. It encourages proper code structure without circular dependencies that depend on quirks in cjs require algorithm. There's no point in doing "webpack" and just pack everything in one big messy package, as webpack already exists. Rollup works more like a compiler, optimizing stuff instead of bloating stuff.

ctjlewis

comment created time in 11 days

pull request commentdanielgindi/Charts

Resolve conflict for 4.0 branch and master

I think that if this branch is tested and works fine, and the whole point about it is a bigger shift towards Swift, away from ObjC compatibility - then just go ahead, merge it. Let people test it as a beta or an rc for a few days. I don't see anything that breaks compatibility with the Java counterpart also. The naming is converted to swift-like namings, but the workings stays the same.

so about deprecating APIs, green light from you? @danielgindi

I see breaking changes, not deprecations, maybe I missed something. Anyway - that's what major versions are for right? :-)

liuxuan30

comment created time in 11 days

pull request commentdanielgindi/Charts

Resolve conflict for 4.0 branch and master

I think that if this branch is tested and works fine, and the whole point about it is a bigger shift towards Swift, away from ObjC compatibility - then just go ahead, merge it. Let people test it as a beta or an rc for a few days.

I don't see anything that breaks compatibility with the Java counterpart also. The naming is converted to swift-like namings, but the workings stays the same.

liuxuan30

comment created time in 12 days

pull request commentdanielgindi/Charts

Resolve conflict for 4.0 branch and master

@jjatie @danielgindi could any of you can take a look at why Bar Chart all failed? I see a shift on y axis, but couldn't remember what's causing the shift: image you can see the bar chart in whole on left side is a bit lower on y-axis direction than the right one.

It seems it's because func calculateLegendOffsets

There was a fix a while back to the legend offsets. It shifted all tests too... I'm not sure how the merge did not catch this as there are snapshots involved.

liuxuan30

comment created time in 12 days

push eventdanielgindi/knex-schema-builder

Daniel Cohen Gindi

commit sha 4b832657658bdc6d6ac7a04d48623acbb1c305d6

Do not publish tests

view details

Daniel Cohen Gindi

commit sha 2d7a950b8e3e5ac31db35bd8385da3a8bd51811e

0.4.10

view details

push time in 16 days

push eventdanielgindi/knex-schema-builder

Yehuda Y

commit sha a1c364dcee6bc42e23ff50e4f295ea8f2370f1bb

Add helpers and upgrade tests

view details

Yehuda Y

commit sha 1d6e8cd18f88ca86288a345a5a9255e1dcc0840d

Fix bug - isInstallNeeded always return false

view details

Daniel Cohen Gindi

commit sha ebb6730903c4242fb4dbdd9181bd0b9b5b10d907

Merge pull request #12 from yeya/tests Critical bug fix, and more tests

view details

push time in 16 days

PR merged danielgindi/knex-schema-builder

Critical bug fix, and more tests

Fix isInstallNeeded always return false

+223 -33

0 comment

9 changed files

yeya

pr closed time in 16 days

pull request commentrollup/plugins

Dynamic require

@lukastaegert please lock the conversation...

danielgindi

comment created time in 17 days

pull request commentrollup/plugins

Dynamic require

Please just read the docs, also look at issues or open an issue. This PR is tested, merged, and working in production.

danielgindi

comment created time in 17 days

pull request commentrollup/plugins

Dynamic require

dynamicRequireTargets: [
  'node_modules/**/*.svg'
]
danielgindi

comment created time in 17 days

pull request commentrollup/plugins

Dynamic require

@mjmnagy require('@icn/${set}/${icon}.svg') is a static require, not a dynamic one. But require(`@icn/${set}/${icon}.svg`) is dynamic. Anyway yes you should pass a glob pattern that matches all modules that you want to be available for the dynamic require.

danielgindi

comment created time in 17 days

push eventdanielgindi/knex-schema-builder

Yehuda Y

commit sha 0b388dc1ffb225c0cd49516e934f847f0490d035

Add basic tests - install only

view details

Daniel Cohen Gindi

commit sha 560079ee4aa30088153bee69e8c0fa8cce1c6026

Merge pull request #11 from yeya/tests Add basic tests - install only

view details

push time in 18 days

PR merged danielgindi/knex-schema-builder

Add basic tests - install only

Please review

+2760 -1

1 comment

8 changed files

yeya

pr closed time in 18 days

pull request commentdanielgindi/knex-schema-builder

Add basic tests - install only

Amazing thanks!

yeya

comment created time in 18 days

push eventdanielgindi/knex-schema-builder

Daniel Cohen Gindi

commit sha d75a6899200a3c4a677b65e8bf20af0c854b745c

[fix] return version may be `undefined` in `install()`

view details

Daniel Cohen Gindi

commit sha 121dbc0f9740497ddbfbc7bfcf45642235ea1ea8

0.4.9

view details

push time in 18 days

created tagdanielgindi/SequelNet

tag3.0.50

SQL abstraction/generalization/protection layer.

created time in 18 days

push eventdanielgindi/SequelNet

Daniel Cohen Gindi

commit sha 86e0bee19431202718d69672f4382ad8429bdfe1

Always use ConfigureAwait(false) to allow the system to make better threading decisions

view details

Daniel Cohen Gindi

commit sha 19e474763105a2fb88ff1a576378a16bab40d14e

Open connection only on Closed state, as some connectors test that specifically

view details

Daniel Cohen Gindi

commit sha c034132ec47089d9b72e56e83694980596ea9886

Silence CLS warning

view details

Daniel Cohen Gindi

commit sha 61fd3127e4ba932c6d0672f2a167fd622d54f70c

3.0.50

view details

push time in 18 days

pull request commentexpressjs/compression

Added support for brotli ('br') content-encoding

@dougwilson I've added a commit that re-prioritizes the encodings to br-gzip-deflate. Will work with any browser now.

danielgindi

comment created time in 18 days

issue commentjquery-backstretch/jquery-backstretch

Looking for maintainers

Hey. I used backstretch a while ago and I really like it. Any ways I can implement it in a React web app?

I have tried to follow the docs and did pull the js files from the index.html before the end tag of body of the react app but it doesn't show the background..

This lib is based on the JQuery library. In order to do the same in React there is probably a need for a heavy rewrite.

srobbin

comment created time in 19 days

push eventdanielgindi/knex-schema-builder

Daniel Cohen Gindi

commit sha 2b067e745fdb2f401dc036640dcf80e254e789dc

[fix] call setCurrentDbVersion after success

view details

Daniel Cohen Gindi

commit sha 8d5c03505db569b89973f6230b1bbd579ea9ed32

0.4.8

view details

push time in 19 days

push eventdanielgindi/knex-schema-builder

Daniel Cohen Gindi

commit sha 11ee13840d50072f6627556c6e52106e916707e6

[fix] do not swallow upgrade error

view details

Daniel Cohen Gindi

commit sha 4e8a1c51d49471513011dbb87eaf09e2967ded7c

0.4.7

view details

push time in 19 days

push eventdanielgindi/express-compression

Daniel Cohen Gindi

commit sha 95589f3608c39d4154796ba3707b2d695fd10551

Prefer br over gzip and deflate

view details

push time in 19 days

pull request commentexpressjs/compression

Added support for brotli ('br') content-encoding

Hi @danielgindi sorry if I wasn't clear. I tried to start that conversation in https://github.com/expressjs/compression/pull/172#pullrequestreview-447507768 but you never seemed to answer my question. So perhaps we should circle back around to that, and can you provide what I asked for? :

Well I did answer that, but perhaps the answer is not so simple. By standard you should respect the requested prioritization, and currently browsers prefer gzip for some reason. I guess there is an assumption that a lot of servers do not support br, so br was added without much thought.

Anyway this module already re-prioritizes gzip over deflate. So if that's what we're doing, we should also do this for br over the rest.

danielgindi

comment created time in 21 days

pull request commentexpressjs/compression

Added support for brotli ('br') content-encoding

Hi @NathanielHill I am just waiting on the changes referenced above, specifically, when I tested this PR, it did not result in br responses in any of the major web browsers (Chrome, Firefox) that support br, so I'm kind of at a loss for what value this change would bring or if it is broken.

If this change is not going to actually result in the (better) br compression in the web browsers, perhaps someone can better explain what the purpose of this PR is? FWIW, the Express middleware shrinkray does result in br in those web browsers, so it's certainly possible to achieve.

Of course it's possible to "achieve". But I did not want to presume that I can change the prioritization here. Gzip is currently prioritized in the code. Currently browsers do not put br first, but there are other clients (i.e api requests between servers).

If this is what you want (which is not clear at all, as you just kept your silence about this), it's easy to achieve.

danielgindi

comment created time in 23 days

push eventdanielgindi/express-body-parser

Daniel Cohen Gindi

commit sha c08e89936b8e4ef37e9f9594b974ad22f7f8ed37

Updated brotli detection method

view details

push time in 24 days

push eventdanielgindi/express-compression

Daniel Cohen Gindi

commit sha a4a6f51ca0688f7ce79fbaaa314483a346c58597

Updated brotli detection method

view details

push time in 24 days

pull request commentElaWorkshop/TagListView

Natural RTL/LTR support

@csvenja Any plans for a release?

danielgindi

comment created time in 24 days

pull request commentBoris-Em/BEMCheckBox

Migrate to Swift

Any plans for a release to CocoaPods?

Boris-Em

comment created time in 24 days

delete branch danielgindi/grunt-legacy-util

delete branch : patch-1

delete time in a month

push eventdanielgindi/knex-schema-builder

Daniel Cohen Gindi

commit sha 75930c969fe672183b37373db203f9f4dff1e0d7

0.4.6

view details

push time in a month

push eventdanielgindi/knex-schema-builder

yeya

commit sha f3f6d4b693c4d0567a0c09a37e67c607e591618d

Fix `ReferenceError: version is not defined` Close #9

view details

Daniel Cohen Gindi

commit sha 88dab18d0497732b9112a813bc9b2da49c42038b

Merge pull request #10 from yeya/patch-2 Fix `ReferenceError: version is not defined`

view details

push time in a month

issue commentnodejs/readable-stream

Circular dependencies (prevents proper `rollup`)

@perrin4869 I've answered on rollup's repo. Anyway you did misconfigure. Please add transformMixedEsModules: true, and add your importing file to the commonjs include

danielgindi

comment created time in a month

issue commentrollup/plugins

rollup doesn't fully process modules when using dynamicRequireTargets

@perrin4869 I apologize but I missed some misconfigurations in your repo!

First, you declared include: /node_modules/ for commonjs, which means you don't let it to continue transpiling the main file after it gets some commonjs stuff injected to it. Second, you need to add transformMixedEsModules: true, as your main file is going to be a mix of ES imports, and commonjs stuff coming in from the readable-stream module and from the commonjs helpers.

I tested with removing the include (or extending it) and adding transformMixedEsModules - and your repo works fine.

@lukastaegert I think it makes sense to automatically continue tranforming any file that gets commonjs helpers injected into it right?

perrin4869

comment created time in a month

CommitCommentEvent

issue commentnodejs/readable-stream

Circular dependencies (prevents proper `rollup`)

@perrin4869 Yes it is. The ideal situation is to not have circular dependencies, as this introduces a mock of commonjs module system into your bundle. Your config looks good. But it looks like rollup stops processing without throwing any error. The output is only partially processed.

danielgindi

comment created time in a month

CommitCommentEvent

Pull request review commentrollup/plugins

feat(commonjs): reconstruct real es module from __esModule marker

     "import/prefer-default-export": "off",     "import/extensions": "off",     "import/no-unresolved": "off",-    "@typescript-eslint/no-unused-vars": "off"+    "@typescript-eslint/no-unused-vars": "off",+    "camelcase": "off",+    "no-underscore-dangle": "off"

Oh but you can exclude the tests folder, or override settings for the tests folder

LarsDenBakker

comment created time in a month

push eventdanielgindi/node-lru-cache

Daniel Cohen Gindi

commit sha d00dc5151d5771369e1635e8b11f2e1c8729493b

Optimization for `prune()` (half the work)

view details

push time in a month

issue commentdanielgindi/knex-schema-builder

Unexpected token in schema.json is reported as 'empty-database'

Please test with 0.4.5 ;-)

yeya

comment created time in a month

push eventdanielgindi/knex-schema-builder

Daniel Cohen Gindi

commit sha be2551ad98065435f0032b8cba487c3535c61ea8

Moved to async/await, improved error handling/rethrowing (fixes #9)

view details

Daniel Cohen Gindi

commit sha 5b04824c4a8205a2724c9c432e4db66f9f17d5ef

Bumped minimum nodejs to 8.0

view details

Daniel Cohen Gindi

commit sha 7b66e0b24ea52ec90b088524bfc1f16a043b4e9f

0.4.5

view details

push time in a month

issue closeddanielgindi/knex-schema-builder

Unexpected token in schema.json is reported as 'empty-database'

When schema.json file contains invalid json, the upgrade process ignore the error because originalVersion === undefined here and throw empty-database error instead.

  • Steps to reproduce: Run DB Upgrade with schema.json contains invalid JSON, for example: { "schema": "wrong", }
  • Expected Result: throw SyntaxError: Unexpected token } in JSON at position X
  • Actual Result: throw empty-database

closed time in a month

yeya

Pull request review commentrollup/plugins

feat(commonjs): reconstruct real es module from __esModule marker

     "import/prefer-default-export": "off",     "import/extensions": "off",     "import/no-unresolved": "off",-    "@typescript-eslint/no-unused-vars": "off"+    "@typescript-eslint/no-unused-vars": "off",+    "camelcase": "off",+    "no-underscore-dangle": "off"

Had to add some eslint ignore, what is the prefered approach here?

If I understand correctly, you did this due to the const at the top. It's pretty standard for consts to be upper-underscore-case, and it looks like eslint supports that out of the box:

If ESLint decides that the variable is a constant (all uppercase), then no warning will be thrown

(https://eslint.org/docs/rules/camelcase)

So it's weird you had to do this. Anyway I'm for using a local eslint-disable-line on the same line. So other instances will still warn like it usually does, to keep the style aligned.

LarsDenBakker

comment created time in a month

issue commentrollup/plugins

[commonjs] Discussion and overview of (nearly) all current interop issues + ideas how to move forward

@lukastaegert I just want to say you've handled all the "personal" rant and grumbling of people much better than I would, and ended up with this much appreciated interop overhaul.

lukastaegert

comment created time in a month

issue commentrollup/plugins

[commonjs] Discussion and overview of (nearly) all current interop issues + ideas how to move forward

@lukastaegert Seems like now I won't have to submit so many interop patches, saved me some work ;-)

lukastaegert

comment created time in a month

pull request commentfacebook/react-native

Allow touches on overflowed children when `overflow: visible` (Android)

@stackia don't count on it. But in the mean time you could add a transparent overlay on top of everything, and move tooltips around inside it. Your case is pretty simple as tooltips usually have to be the highest z-index, so you don't really need overflowing.

danielgindi

comment created time in a month

push eventdanielgindi/SequelNet

Daniel Cohen Gindi

commit sha d4cae6ccfa932040e2da0c30788aea5cd98d3e61

Corrected Int32 type

view details

Daniel Cohen Gindi

commit sha 89f71c5d79ce87804b03a0363e082754f5637fa0

3.0.49

view details

push time in a month

created tagdanielgindi/SequelNet

tag3.0.49

SQL abstraction/generalization/protection layer.

created time in a month

push eventdanielgindi/SequelNet

Daniel Cohen Gindi

commit sha 1af1d7730926949ae914cc4c85af8093966c989e

Fix broken sync migrations

view details

Daniel Cohen Gindi

commit sha a71f6cabda800c3a54b304644bcd5656cd10652b

3.0.48

view details

push time in a month

created tagdanielgindi/SequelNet

tag3.0.48

SQL abstraction/generalization/protection layer.

created time in a month

push eventdanielgindi/SequelNet

Daniel Cohen Gindi

commit sha 819bc86adc7ddb54f10b9115665f6f9b3d006c3b

Fixed Migration class forcing override of methods

view details

Daniel Cohen Gindi

commit sha df86367cbfb5eb9c780c6f568c196bd5cb8bd0d6

Updated connector versions

view details

Daniel Cohen Gindi

commit sha 92fefa29a6dbb338bfde31defae8fc2d018ffc85

3.0.47

view details

push time in a month

created tagdanielgindi/SequelNet

tag3.0.47

SQL abstraction/generalization/protection layer.

created time in a month

created tagdanielgindi/SequelNet

tag3.0.46

SQL abstraction/generalization/protection layer.

created time in a month

push eventdanielgindi/SequelNet

Daniel Cohen Gindi

commit sha 488e1a1dcf57236b27b693ac4615e1e93946adfa

Supprot async migrations

view details

Daniel Cohen Gindi

commit sha fcf4cd1a7fef4b1c0b1f8616fc856a836046ebf4

3.0.46

view details

push time in a month

pull request commentexpressjs/compression

Added support for brotli ('br') content-encoding

Waiting for your changes to review.

Anything specific?

danielgindi

comment created time in a month

pull request commentexpressjs/body-parser

Added support for brotli ('br') content-encoding

@dougwilson Have you noticed that we suddenly have a "leak" in the older node versions in CI? These happens without any apparent reason, and the change in the code was insignificant, only DRYed a throw statement.
That's why I disabled that notification to begin with.

danielgindi

comment created time in a month

Pull request review commentexpressjs/body-parser

Added support for brotli ('br') content-encoding

 var zlib = require('zlib')  module.exports = read +/**+ * @const+ * whether current node version has brotli support+ */+var hasBrotliSupport = 'brotli' in process.versions

It's a question for you actually. It's about semantics. What exactly do you feel is right to detect there? I don't have a strong feeling towards either way. And - any changes you feel are right :-)

danielgindi

comment created time in a month

issue commentnodejs/help

Best method to detect brotli support in Node.js runtime

@devsnek It's basically about trying to figure out if we can use the zlib to decompress brotli. I guess the detection in this case should be 'createBrotliDecompress in zlib`, but then different people have different opinions on what's "right" regarding feature detection.

Also on one hand we could say that we only trust node's builtin brotli codecs, and trust node's declarations about it.
Personally I don't care, and any kind of feature detection is "good enough" for me. But if we're diving into technicalities, I would say that any polyfill that might add/replace brotli into zlib - should behave in a compatible and predicted way, and that it's the user's responsibility to know what libraries he/she is installing.

dougwilson

comment created time in a month

Pull request review commentexpressjs/body-parser

Added support for brotli ('br') content-encoding

 before trusting. For example, `req.body.foo.toString()` may fail in multiple ways, for example the `foo` property may not be there or may not be a string, and `toString` may not be a function and instead a string or other user input. +**Note** Brotli is supported only since Node.js versions v11.7.0 and v10.16.0.

Still, where in the README do you want this? There's no explicit section for br...

danielgindi

comment created time in a month

pull request commentexpressjs/compression

Added support for brotli ('br') content-encoding

How are we doing?

danielgindi

comment created time in a month

Pull request review commentexpressjs/body-parser

Added support for brotli ('br') content-encoding

 function contentstream (req, debug, inflate) {       stream = req       stream.length = length       break+    case 'br':+      if (hasBrotliSupport) {+        stream = zlib.createBrotliDecompress()+        debug('brotli decompress body')+        req.pipe(stream)+      } else {+        throw createError(415, 'unsupported content encoding "' + encoding + '"', {

Done

danielgindi

comment created time in a month

push eventdanielgindi/express-body-parser

Daniel Cohen Gindi

commit sha ff788ac674ce0a7aa7d5dd0ba226f61dd17a328e

DRYed error throwing (the one with encoding specified)

view details

push time in a month

Pull request review commentexpressjs/body-parser

Added support for brotli ('br') content-encoding

 before trusting. For example, `req.body.foo.toString()` may fail in multiple ways, for example the `foo` property may not be there or may not be a string, and `toString` may not be a function and instead a string or other user input. +**Note** Brotli is supported only since Node.js versions v11.7.0 and v10.16.0.

I think you might be confusing the compression repo. In this one there's no br support section. As there's nothing to configure, it's just decoding.

danielgindi

comment created time in a month

Pull request review commentexpressjs/body-parser

Added support for brotli ('br') content-encoding

 var zlib = require('zlib')  module.exports = read +/**+ * @const+ * whether current node version has brotli support+ */+var hasBrotliSupport = 'brotli' in process.versions

Seems like they don't have an answer yet 😂

Btw you know that you can commit changes to a branch of a PR?

danielgindi

comment created time in a month

pull request commentexpressjs/body-parser

Added support for brotli ('br') content-encoding

LGTM @danielgindi!

Thanks fo the links attached to the PR. I will love to be able to try that compression in my next project 💪

Yeah this brotli is truely amazing :)

Btw we have a PR in the compression repo, to allow responses to be encoded too. It's two sides of the same coin

danielgindi

comment created time in a month

created tagdanielgindi/SequelNet

tag3.0.45

SQL abstraction/generalization/protection layer.

created time in a month

push eventdanielgindi/SequelNet

Daniel Cohen Gindi

commit sha 24a46c2cae4c651e95e81a2a39fe1eab6c91a13e

[fix] Insert/Update should not overwrite InsertOrUpdate()

view details

Daniel Cohen Gindi

commit sha 8085a7ecc202b08524a0a61a2d819ae1fc8602f1

3.0.45

view details

push time in a month

push eventdanielgindi/react-native-fast-image

Daniel Cohen Gindi

commit sha d4987e363a869497256bf46bf45bae006328d25b

Added more test snapshots

view details

push time in 2 months

push eventdanielgindi/react-native-fast-image

push time in 2 months

pull request commentdanielgindi/rollup-plugin-natives

Check for the existence of the files

Looks good enough :-) We will work later on better emitting of errors, either clearer errors to the console, or emitting as a rollup warning

aminya

comment created time in 2 months

push eventdanielgindi/rollup-plugin-natives

Amin Yahyaabadi

commit sha 0291313242b22fe65e2731bc91b9661861292962

use fs-extra

view details

Amin Yahyaabadi

commit sha 200324f55cf35c0c2f49fb56a82223af79946771

Update package-lock.json

view details

Amin Yahyaabadi

commit sha cfc9f6a8a0b4ddfd6bf42d0eb7a7c03cb50fbcfd

make sure copyTo path exists

view details

Amin Yahyaabadi

commit sha fe49317bd7fb44824a62b3e229aedc3d2df9be5f

check existance of nativePath

view details

Amin Yahyaabadi

commit sha 0c966fd332d15204f1a862c215c1b434fea880ba

using pathExistsSync instead of existsSync

view details

aminya

commit sha e522f308bd5f4e6819987e356c1dd15a0ab50805

clarify readme

view details

Daniel Cohen Gindi

commit sha d04e44ded5637a895360350f55fc18a05399052c

Merge pull request #5 from aminya/pathExistsSync Check for the existence of the files

view details

push time in 2 months

PR merged danielgindi/rollup-plugin-natives

Check for the existence of the files
  • Makes sure that the output path exists
  • Gives a warning if a native file does not exist (For example if Release is only built and Debug is not)

Fixes #2

+61 -21

1 comment

4 changed files

aminya

pr closed time in 2 months

issue closeddanielgindi/rollup-plugin-natives

Error: ENOENT: no such file or directory, copyfile

I get an error when I try to use this plugin

[!] (plugin rollup-plugin-natives) Error: ENOENT: no such file or directory, copyfile 'C:\project\node_modules\oniguruma\build\Release\onig_scanner.node' -> 'dist\libs\onig_scanner.node'
Error: ENOENT: no such file or directory, copyfile 'C:\project\node_modules\oniguruma\build\Release\onig_scanner.node' -> 'dist\libs\onig_scanner.node'
    at Object.copyFileSync (fs.js:63:27)
    at Object.resolveId (C:\project\script\node_modules\rollup-plugin-natives\src\index.js:63:27)
    at C:\project\script\node_modules\rollup\dist\shared\rollup.js:63:27

The file C:\project\node_modules\oniguruma\build\Release\onig_scanner.node exists

Note that I run rollup from inside script folder for other reasons.

closed time in 2 months

aminya

issue commentnodejs/node

AsyncLocalStorage kills 97% of performance in an `async` environment

@mcollina I get that. Although some async operations may take less than 2ms, still being async and taking advantage of libuv threads.

I'm going to do a wet test today on a large scale application that has all imaginable scenarios implemented, and that should service hundreds of millions of users. I'll let you guys know how it goes :-)

danielgindi

comment created time in 2 months

pull request commentDylanVann/react-native-fast-image

Support for defaultSource

@rpavlovs I've rebased. Please anyone test this as I haven't tested it with the latest master changes.

Also, @DylanVann I'm getting tired of this. Could you please take a look and merge? Every month you have breaking structural changes which make it difficult to rebase.

danielgindi

comment created time in 2 months

push eventdanielgindi/react-native-fast-image

Dylan Vann

commit sha 0d34e620693be97da56e2d7421261a9486d4b711

chore: deduplicate dependencies

view details

Dylan Vann

commit sha c279577f9532447dcb30fbfbafcb368e9f092f05

build: use dv-scripts (#707) - Simplifying configuration for: - Building - Linting - Testing - Releasing I'll fix code coverage in an upgrade.

view details

semantic-release-bot

commit sha 8f14faffdbc73d3cc3c1978911eab4d896622427

release(version): Release 8.1.6 [skip ci] ## [8.1.6](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.5...v8.1.6) (2020-07-17)

view details

Dylan Vann

commit sha 4ee0000048eea0526ba259b8d11966ed58b2fd25

docs: fix changelog

view details

semantic-release-bot

commit sha 6067b7dd3c04a3fa65e59a9e1bd28a6d51bf3da6

release(version): Release 8.1.7 [skip ci] ## [8.1.7](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.6...v8.1.7) (2020-07-17)

view details

Alejandro

commit sha cd81b1b66a8d9938764a66e1f3c1bd5ff20b3565

fix: peer dependency warning (#653)

view details

semantic-release-bot

commit sha c23204f52140d818914890589cdddb3ef5e4bf6e

release(version): Release 8.1.8 [skip ci] ## [8.1.8](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.7...v8.1.8) (2020-07-17) ### Bug Fixes * peer dependency warning ([#653](https://github.com/DylanVann/react-native-fast-image/issues/653)) ([cd81b1b](https://github.com/DylanVann/react-native-fast-image/commit/cd81b1b66a8d9938764a66e1f3c1bd5ff20b3565))

view details

lgenzelis

commit sha 94e2256da234d535e88172ce325c89e7cb69fc6e

fix: wrong cache type (#688) [skip ci] Co-authored-by: Lucas Genzelis <lucas@foxbox.com>

view details

semantic-release-bot

commit sha 0fd9f773ee2e44c9e7d5691c239887699dccf615

release(version): Release 8.1.9 [skip ci] ## [8.1.9](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.8...v8.1.9) (2020-07-17) ### Bug Fixes * wrong cache type ([#688](https://github.com/DylanVann/react-native-fast-image/issues/688)) [skip ci] ([94e2256](https://github.com/DylanVann/react-native-fast-image/commit/94e2256da234d535e88172ce325c89e7cb69fc6e))

view details

Lucas Barros

commit sha 964645667525dc09f625bc471548b995e01d0061

fix: update SDWebImage and SDWebImageWebPCoder (#689)

view details

semantic-release-bot

commit sha 1fd53007efc23a77236301a348b8126a2d15c760

release(version): Release 8.1.10 [skip ci] ## [8.1.10](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.9...v8.1.10) (2020-07-17) ### Bug Fixes * update SDWebImage and SDWebImageWebPCoder ([#689](https://github.com/DylanVann/react-native-fast-image/issues/689)) ([9646456](https://github.com/DylanVann/react-native-fast-image/commit/964645667525dc09f625bc471548b995e01d0061))

view details

Lucas Vieira

commit sha e33664fbcff4be7b180c3843422f76e9d0b1c4f8

feat: export ResizeMode and Priority types (#678)

view details

semantic-release-bot

commit sha 2eb31991433163ea1952a634af329da19fb364f3

release(version): Release 8.2.0 [skip ci] # [8.2.0](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.10...v8.2.0) (2020-07-17) ### Features * export ResizeMode and Priority types ([#678](https://github.com/DylanVann/react-native-fast-image/issues/678)) ([e33664f](https://github.com/DylanVann/react-native-fast-image/commit/e33664fbcff4be7b180c3843422f76e9d0b1c4f8))

view details

Milan Susnjar

commit sha ba0f238821ba23517b8e62e759f685b8cd67c0c6

fix: remove cache property if using fallback iOS image has its own properties for cache and if fallback is true and regular image is being rendered we can't set FastImage's cache value because it doesn't match.

view details

semantic-release-bot

commit sha 184eecb1210ce548f333c38dbfd17f63222dc188

release(version): Release 8.2.1 [skip ci] ## [8.2.1](https://github.com/DylanVann/react-native-fast-image/compare/v8.2.0...v8.2.1) (2020-07-17) ### Bug Fixes * remove cache property if using fallback ([ba0f238](https://github.com/DylanVann/react-native-fast-image/commit/ba0f238821ba23517b8e62e759f685b8cd67c0c6))

view details

JP

commit sha 22f89e43a422150412924da9fd0f3eca7dd77cfa

fix: accessibilityIgnoresInvertColors prop not recognised when using TypeScript (#666) - in testing [eslint-plugin-react-native-a11y](https://github.com/FormidableLabs/eslint-plugin-react-native-a11y) with `react-native-fast-image`, I noticed that a11y props such as `accessibilityIgnoresInvertColors` are missing from FastImage's TypeScript definitions - in theory the "proper" fix for this would be to make `FastImageProps` extend `ImagePropsBase` from React Native, because ultimately FastImage [spreads Props down](https://github.com/DylanVann/react-native-fast-image/blob/master/src/index.tsx#L150-L160) to React Native's Image component (including a11y props) - attempting this "proper" fix proved problematic in practice due to incompatibilities between the two interfaces - instead rather than extending the entirety of `ImagePropsBase` (which itself extends `AccessibilityProps`) we can resolve this by simply also extending `AccessibilityProps`

view details

semantic-release-bot

commit sha 0e29d83b7d67afd2e1357bb5757250129f085a54

release(version): Release 8.2.2 [skip ci] ## [8.2.2](https://github.com/DylanVann/react-native-fast-image/compare/v8.2.1...v8.2.2) (2020-07-17) ### Bug Fixes * accessibilityIgnoresInvertColors prop not recognised when using TypeScript ([#666](https://github.com/DylanVann/react-native-fast-image/issues/666)) ([22f89e4](https://github.com/DylanVann/react-native-fast-image/commit/22f89e43a422150412924da9fd0f3eca7dd77cfa)), closes [/github.com/DylanVann/react-native-fast-image/blob/master/src/index.tsx#L150-L160](https://github.com//github.com/DylanVann/react-native-fast-image/blob/master/src/index.tsx/issues/L150-L160)

view details

DreamPiggy

commit sha 4a7cd64f5b0aa40b04d63ccb105ee2b511abe624

feat(ios): allow for for per-image-request-headers (#691) * Bump the dependency of SDWebImage into 5.8+ because of the SDWebImageDownloaderRequestModifier convenient API usage * Fix the implementation on iOS for per-image-request-header-setup. Should not use `SDWebImageDownloader` which manage the global shared headers. Use the context option of request modifier. * Add the support for data:image URL for WebP images * Alaways bypass invalid SSL certificate error, same behavior like React-Native itself * Fix the implementation of request modifier on SDWebImage, which have bugs on 5.8.0 (will fix in 5.8.1), revert the dependency bump * Revert the changes to bypass SSL error * Remove the unused Podfile.lock changes

view details

semantic-release-bot

commit sha 866274ff3c84c14c69acc87032d21db8b4b96961

release(version): Release 8.3.0 [skip ci] # [8.3.0](https://github.com/DylanVann/react-native-fast-image/compare/v8.2.2...v8.3.0) (2020-07-17) ### Features * **ios:** allow for for per-image-request-headers ([#691](https://github.com/DylanVann/react-native-fast-image/issues/691)) ([4a7cd64](https://github.com/DylanVann/react-native-fast-image/commit/4a7cd64f5b0aa40b04d63ccb105ee2b511abe624))

view details

Dylan Vann

commit sha 7314947234265575870a2d602061a79443b5d49d

docs: update status badge [skip ci]

view details

push time in 2 months

push eventdanielgindi/react-native-fast-image

Dylan Vann

commit sha 0d34e620693be97da56e2d7421261a9486d4b711

chore: deduplicate dependencies

view details

Dylan Vann

commit sha c279577f9532447dcb30fbfbafcb368e9f092f05

build: use dv-scripts (#707) - Simplifying configuration for: - Building - Linting - Testing - Releasing I'll fix code coverage in an upgrade.

view details

semantic-release-bot

commit sha 8f14faffdbc73d3cc3c1978911eab4d896622427

release(version): Release 8.1.6 [skip ci] ## [8.1.6](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.5...v8.1.6) (2020-07-17)

view details

Dylan Vann

commit sha 4ee0000048eea0526ba259b8d11966ed58b2fd25

docs: fix changelog

view details

semantic-release-bot

commit sha 6067b7dd3c04a3fa65e59a9e1bd28a6d51bf3da6

release(version): Release 8.1.7 [skip ci] ## [8.1.7](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.6...v8.1.7) (2020-07-17)

view details

Alejandro

commit sha cd81b1b66a8d9938764a66e1f3c1bd5ff20b3565

fix: peer dependency warning (#653)

view details

semantic-release-bot

commit sha c23204f52140d818914890589cdddb3ef5e4bf6e

release(version): Release 8.1.8 [skip ci] ## [8.1.8](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.7...v8.1.8) (2020-07-17) ### Bug Fixes * peer dependency warning ([#653](https://github.com/DylanVann/react-native-fast-image/issues/653)) ([cd81b1b](https://github.com/DylanVann/react-native-fast-image/commit/cd81b1b66a8d9938764a66e1f3c1bd5ff20b3565))

view details

lgenzelis

commit sha 94e2256da234d535e88172ce325c89e7cb69fc6e

fix: wrong cache type (#688) [skip ci] Co-authored-by: Lucas Genzelis <lucas@foxbox.com>

view details

semantic-release-bot

commit sha 0fd9f773ee2e44c9e7d5691c239887699dccf615

release(version): Release 8.1.9 [skip ci] ## [8.1.9](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.8...v8.1.9) (2020-07-17) ### Bug Fixes * wrong cache type ([#688](https://github.com/DylanVann/react-native-fast-image/issues/688)) [skip ci] ([94e2256](https://github.com/DylanVann/react-native-fast-image/commit/94e2256da234d535e88172ce325c89e7cb69fc6e))

view details

Lucas Barros

commit sha 964645667525dc09f625bc471548b995e01d0061

fix: update SDWebImage and SDWebImageWebPCoder (#689)

view details

semantic-release-bot

commit sha 1fd53007efc23a77236301a348b8126a2d15c760

release(version): Release 8.1.10 [skip ci] ## [8.1.10](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.9...v8.1.10) (2020-07-17) ### Bug Fixes * update SDWebImage and SDWebImageWebPCoder ([#689](https://github.com/DylanVann/react-native-fast-image/issues/689)) ([9646456](https://github.com/DylanVann/react-native-fast-image/commit/964645667525dc09f625bc471548b995e01d0061))

view details

Lucas Vieira

commit sha e33664fbcff4be7b180c3843422f76e9d0b1c4f8

feat: export ResizeMode and Priority types (#678)

view details

semantic-release-bot

commit sha 2eb31991433163ea1952a634af329da19fb364f3

release(version): Release 8.2.0 [skip ci] # [8.2.0](https://github.com/DylanVann/react-native-fast-image/compare/v8.1.10...v8.2.0) (2020-07-17) ### Features * export ResizeMode and Priority types ([#678](https://github.com/DylanVann/react-native-fast-image/issues/678)) ([e33664f](https://github.com/DylanVann/react-native-fast-image/commit/e33664fbcff4be7b180c3843422f76e9d0b1c4f8))

view details

Milan Susnjar

commit sha ba0f238821ba23517b8e62e759f685b8cd67c0c6

fix: remove cache property if using fallback iOS image has its own properties for cache and if fallback is true and regular image is being rendered we can't set FastImage's cache value because it doesn't match.

view details

semantic-release-bot

commit sha 184eecb1210ce548f333c38dbfd17f63222dc188

release(version): Release 8.2.1 [skip ci] ## [8.2.1](https://github.com/DylanVann/react-native-fast-image/compare/v8.2.0...v8.2.1) (2020-07-17) ### Bug Fixes * remove cache property if using fallback ([ba0f238](https://github.com/DylanVann/react-native-fast-image/commit/ba0f238821ba23517b8e62e759f685b8cd67c0c6))

view details

JP

commit sha 22f89e43a422150412924da9fd0f3eca7dd77cfa

fix: accessibilityIgnoresInvertColors prop not recognised when using TypeScript (#666) - in testing [eslint-plugin-react-native-a11y](https://github.com/FormidableLabs/eslint-plugin-react-native-a11y) with `react-native-fast-image`, I noticed that a11y props such as `accessibilityIgnoresInvertColors` are missing from FastImage's TypeScript definitions - in theory the "proper" fix for this would be to make `FastImageProps` extend `ImagePropsBase` from React Native, because ultimately FastImage [spreads Props down](https://github.com/DylanVann/react-native-fast-image/blob/master/src/index.tsx#L150-L160) to React Native's Image component (including a11y props) - attempting this "proper" fix proved problematic in practice due to incompatibilities between the two interfaces - instead rather than extending the entirety of `ImagePropsBase` (which itself extends `AccessibilityProps`) we can resolve this by simply also extending `AccessibilityProps`

view details

semantic-release-bot

commit sha 0e29d83b7d67afd2e1357bb5757250129f085a54

release(version): Release 8.2.2 [skip ci] ## [8.2.2](https://github.com/DylanVann/react-native-fast-image/compare/v8.2.1...v8.2.2) (2020-07-17) ### Bug Fixes * accessibilityIgnoresInvertColors prop not recognised when using TypeScript ([#666](https://github.com/DylanVann/react-native-fast-image/issues/666)) ([22f89e4](https://github.com/DylanVann/react-native-fast-image/commit/22f89e43a422150412924da9fd0f3eca7dd77cfa)), closes [/github.com/DylanVann/react-native-fast-image/blob/master/src/index.tsx#L150-L160](https://github.com//github.com/DylanVann/react-native-fast-image/blob/master/src/index.tsx/issues/L150-L160)

view details

DreamPiggy

commit sha 4a7cd64f5b0aa40b04d63ccb105ee2b511abe624

feat(ios): allow for for per-image-request-headers (#691) * Bump the dependency of SDWebImage into 5.8+ because of the SDWebImageDownloaderRequestModifier convenient API usage * Fix the implementation on iOS for per-image-request-header-setup. Should not use `SDWebImageDownloader` which manage the global shared headers. Use the context option of request modifier. * Add the support for data:image URL for WebP images * Alaways bypass invalid SSL certificate error, same behavior like React-Native itself * Fix the implementation of request modifier on SDWebImage, which have bugs on 5.8.0 (will fix in 5.8.1), revert the dependency bump * Revert the changes to bypass SSL error * Remove the unused Podfile.lock changes

view details

semantic-release-bot

commit sha 866274ff3c84c14c69acc87032d21db8b4b96961

release(version): Release 8.3.0 [skip ci] # [8.3.0](https://github.com/DylanVann/react-native-fast-image/compare/v8.2.2...v8.3.0) (2020-07-17) ### Features * **ios:** allow for for per-image-request-headers ([#691](https://github.com/DylanVann/react-native-fast-image/issues/691)) ([4a7cd64](https://github.com/DylanVann/react-native-fast-image/commit/4a7cd64f5b0aa40b04d63ccb105ee2b511abe624))

view details

Dylan Vann

commit sha 7314947234265575870a2d602061a79443b5d49d

docs: update status badge [skip ci]

view details

push time in 2 months

issue commentnodejs/node

AsyncLocalStorage kills 97% of performance in an `async` environment

So you're saying the numbers I've posted are not bad enough? And this is intentional, as I wanted to measure the impact on the await.

danielgindi

comment created time in 2 months

issue commentnodejs/node

AsyncLocalStorage kills 97% of performance in an `async` environment

I agree that micro-benchmarks do not present the whole picture. But it does present the performance difference of this specific feature, and how it will affect your code if you have a lot of awaits/Promises. And if you do have a loop over little-work async code somewhere in your app, something that happens a lot of time, you will be surprised to see a major hit in performance.

So if the hit in the micro benchmark was 20%, that would be acceptable. But that's not the case.

danielgindi

comment created time in 2 months

issue commentnodejs/node

AsyncLocalStorage kills 97% of performance in an `async` environment

I've tried to run this test on the latest master and got the following result:

Performed 769807 iterations to warmup
Performed 747431 iterations (with ALS enabled)
Performed 8319900 iterations (with ALS disabled)

So, it's slightly better than the reported result, yet ALS (or async_hooks to be more precise) have a significant overhead in such simple synthetical benchmarks where are promises are used heavily and there are no significant computation or I/O operations going on.

I've also tried to run benchmark/async_hooks/promises.js with modifications from #34523 with the following no-op hook:

static void FastPromiseHook(PromiseHookType type, Local<Promise> promise,
                            Local<Value> parent) {
  Local<Context> context = promise->CreationContext();
  Environment* env = Environment::GetCurrent(context);
  if (env == nullptr) return;

  env->new_async_id();
}

and got the following result:

$ ./node benchmark/async_hooks/promises.js
async_hooks/promises.js asyncHooks="enabled" n=1000000: 885,253.5326989443
async_hooks/promises.js asyncHooks="enabledWithDestroy" n=1000000: 251,938.54719793968
async_hooks/promises.js asyncHooks="enabledWithInitOnly" n=1000000: 787,156.9010261587
async_hooks/promises.js asyncHooks="disabled" n=1000000: 1,583,621.8483830877

As you may see in this benchmark with get around 50% of the disabled performance in situations when the no-op hook is installed. And that means that 50% is the best overhead we can get in such benchmarks with the current V8 PromiseHook integration. In reality the overhead will be higher, as we need to do many operations, not only the env->new_async_id() one.

BTW I've also experimented with internal fields (a couple of them) instead of symbol properties and got no significant performance improvements. Mainly that's because of the fact that with this approach the hook has to do more operations on average when compared with the current implementation.

Well, only slightly better. with ALS enabled is 8.9% of with ALS disabled, which means that 91% is lost, and not 93% (which was the consistent number I got on all machines).

If there was a way to only get a hook installed for a case of an await returning to parent context - that would help us have a js-land implementation with much less overhead.

danielgindi

comment created time in 2 months

pull request commentnodejs/node

[Experiment] async_hooks: optimize fast-path promise hook for ALS

@puzpuzpuz Could you run the benchmark snippet in #34493 on your PR and put the results here?

puzpuzpuz

comment created time in 2 months

pull request commentnodejs/node

[Experiment] async_hooks: optimize fast-path promise hook for ALS

v8 is able to show the origin of a await (not full long stack traces) but not more (see https://v8.dev/blog/fast-async#improved-developer-experience). If you use plain Promises or callback based APIs there is nothing like for await.

ALS doesn't has this limitation, it follows all async transactions signaled by async hooks - and this comes with a cost.

That's right. But my Zone implementation filled the rest by wrapping callback functions and patching Promises, much like Angular's polyfill did. The overall impact was between ~10%-~25%. And it was all userland. JS. It was not 97% impact.

puzpuzpuz

comment created time in 2 months

pull request commentnodejs/node

[Experiment] async_hooks: optimize fast-path promise hook for ALS

I'm trying to understand something here. V8 knows how to generate a stack trace that considers await calls, but the cost is paid when delivered right? So when we want to query ALS store, can't use the same technique to find the path we went through, and add some additional metadata over the breadcrumbs as we walk through it?

As I noted in the issue, I achieved a much more performant ALS (actually Zone) using a JS only technique that did basically that. It generated a stack trace when querying the Zone.current, looked at ids that were added to the Error stack (by appending them to the wrapped function called with .run), and mapped those ids to the relevant Zone. I really don't understand why a possible implementation for Zone/ALS should cripple Node by this much?

puzpuzpuz

comment created time in 2 months

more