Giter Site home page Giter Site logo

Comments (16)

satazor avatar satazor commented on May 30, 2024

Hmmm I need to investigate. Thanks for reporting.

from js-spark-md5.

umartopia avatar umartopia commented on May 30, 2024

One more thing to note:
You can try running the index.html file available in your source in Chrome and IE and you can check the difference.

In Chrome:

Hash of Hello : 9ms
Hash of 64 bytes: 2ms
Hash of 128 bytes: 0ms
Hash of 160 bytes: 0ms
Incremental usage:1ms
UTF-8: 2ms
Hashing a PNG: 2ms

IE:

Hash of Hello : 25ms
Hash of 64 bytes: 4ms
Hash of 128 bytes: 5ms
Hash of 160 bytes: 4ms
Incremental usage:8ms
UTF-8: 78ms
Hashing a PNG: 24ms

from js-spark-md5.

satazor avatar satazor commented on May 30, 2024

I spawned a Windows VM with IE11 but I'm not getting these discrepancies:

IE11: Tests completed in 40 milliseconds.
Chrome on the same VM: Tests completed in 38 milliseconds.

I've run the tests 10 times and I get similar results in all of them.

from js-spark-md5.

umartopia avatar umartopia commented on May 30, 2024

It may be related to environment settings or may be OS related

FYI : I was using Windows 8 with IE-11 for testing this stuff

from js-spark-md5.

satazor avatar satazor commented on May 30, 2024

I used a win7 vm, need to test with win8

from js-spark-md5.

vergil-zqp avatar vergil-zqp commented on May 30, 2024

Hi,satazor, I have the same problems with IE10.

from js-spark-md5.

satazor avatar satazor commented on May 30, 2024

I get the same results with win8. Can you guys click in Help -> About and paste here the exact IE version you're testing against? Thanks.

from js-spark-md5.

kaurranjeet12 avatar kaurranjeet12 commented on May 30, 2024

Hi,

I am also facing the same issue with IE. I am using IE version 11.0.9600.18098.

Thanks,
RJ

from js-spark-md5.

satazor avatar satazor commented on May 30, 2024

I will need to take a look when I have some time. If you guys could investigate first it would make it easier for me to do a patch to fix the issue.

from js-spark-md5.

vmihnea avatar vmihnea commented on May 30, 2024

Hi,

Any progress on this issue? We are facing the same problem on IE version 11.0.9600.18349

Thanks,

Vlad

from js-spark-md5.

satazor avatar satazor commented on May 30, 2024

@vmihnea I'm not experiencing this issue on my windows vm. I was hoping that someone of you guys could invest some time in identifying the issue and propose a PR.

from js-spark-md5.

vmihnea avatar vmihnea commented on May 30, 2024

@satazor I've invested more time in profiling and by now I can better isolate the issue, but sadly I am not able to propose a PR.

Bottom line: On IE 11 there is a lot of time spent inside md5cycle function and its subsequent calls to ff(), gg(), hh(), ii(). All these functions combined alot for ~95% of the processing time. I'm attaching a spreadsheet that contains the profiling information.

My tests were performed as follows:

  1. Using file_reader.html I have uploaded a large file (250 MB) - "normal" mode. I have done this on both IE 11 and Chrome (latest). On IE this takes about 55 seconds while on Chrome < 2 seconds.
  2. In an effort to isolate the problem I have created a test file (md5cycle.html - attached). I've stripped your library down to the basic function calls I've identified as troublesome and tried the md5 on an array similar in size with the one resulting from the large file used in step 1. As you can see the results are pretty similar.

Unfortunately this is where I am stuck and cannot help any further. The functions identified as problematic on IE 11 basically do bit-wise operations I have no clue how to interpret let alone how to fix.

My gut feeling is that these bit-wise operations are not very optimized on IE 11 thus taking a little longer and when it comes to large files these differences pile up. I've found no benchmark available on this topic so take it with a grain of salt.

Could you please try to investigate further and let me know if you are able to patch?

Attached files:
md5cycle.html.txt
Profiler.xlsx

Cheers,

Vlad

from js-spark-md5.

vmihnea avatar vmihnea commented on May 30, 2024

One more note. This is reproducible on all our hardware configuration (VM also).

from js-spark-md5.

vmihnea avatar vmihnea commented on May 30, 2024

Hello again,

I've found a fix for the IE 11 performance issues while testing another library (yamd5) which is based on yours.

Basically if I replace your md5cycle function with the one here: yamd5.js I get a clear performance boost on IE 11 while the performance on Chrome & Firefox is very similar. Haven't tested on older IE versions and, from the comments in the code, there might be an impact there.

Thanks,

Vlad

from js-spark-md5.

satazor avatar satazor commented on May 30, 2024

@vmihnea Thanks for the analysis. I will investigate yamd5 and see what they are doing differently.

from js-spark-md5.

satazor avatar satazor commented on May 30, 2024

Should be fixed by #41 and released as v3.0.0. Try it out and post feedback here. Ty @nochev

from js-spark-md5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.