Comments (16)
Hmmm I need to investigate. Thanks for reporting.
from js-spark-md5.
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.
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.
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.
I used a win7 vm, need to test with win8
from js-spark-md5.
Hi,satazor, I have the same problems with IE10.
from js-spark-md5.
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.
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.
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.
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.
@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.
@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:
- 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.
- 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.
One more note. This is reproducible on all our hardware configuration (VM also).
from js-spark-md5.
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.
@vmihnea Thanks for the analysis. I will investigate yamd5 and see what they are doing differently.
from js-spark-md5.
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)
- Streams HOT 3
- Different md5 for the same file HOT 6
- License issue HOT 4
- Speed comparison to js-md5 HOT 2
- Demo link problem
- Provide functionality for calculating MD5 hashes of files HOT 3
- Array buffer allocation failed
- Seems like it doesn't work in Edge for cyrillic symbols HOT 2
- spark.end(); The results after two executions are different HOT 2
- No tag or release for 3.0.1 HOT 2
- MD5 Computed In IE11 Not Steady HOT 1
- IE10 compute file md5 failed
- Is there a sample implementation for react native expo? HOT 1
- in IE is error HOT 1
- md5 error ( d41d8cd98f00b204e9800998ecf8427e for all big files than 600M) HOT 1
- Fix deprecated unescape
- Provide ESM build HOT 5
- Uncaught TypeError: Cannot read properties of undefined (reading 'ArrayBuffer')
- URIError: malformed URI sequence HOT 1
- 超大体积文件多线程计算 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-spark-md5.