Firefox's Optimized Zip Format
taras.glek.net
taras.glek.net
I'm pretty sure that counts as cheating.
AV overhead is a real issue though. I was recently copying a directory full of small files from one fast SSD to another (larger) one. I started the transfer and Windows estimated about 8 hours to finish the transfer, and the overall progress seemed to be roughly on track. On a whim I tried temporarily turning off Microsoft's built-in antivirus scanning. Total transfer time dropped to about 40 minutes.
Edit: thanks for the replies, on second thought it is pretty tricky to know a file you’re writing already exists without trusting the process doing the copying
Or take banks. I was amazed to see how much manual work is done in financial institutions. Skyscrapers with bank name on top of it filled with tens of thousands people. Everyone has computer, among other things burning electricity. Separately, datacenters. How does it compares to crypto? I doubt it's less, if sum up all banks.
But anyway, av-scanning is doing much good, but can be socially out-engineered in a single click, making it useless in most critical cases.
Crypto's current energy consumption is doing a miniscule fraction of the transaction handling that banks are. If you scaled up current crypto to match banks, I don't think that would even be possible.
AFAIK The number of transactions per block and the rate at which blocks are confirmed has nothing to do with how many people are burning through hashes.
And the price of a token is a kind of bounty for mining a block: the higher the price, the more money can be spent trying to win the bounty while still being profitable. You wouldn't see data centers full of ASICs if the reward was only a few hundred bucks.
So how straight forward is it?
>the transaction volume it can support will never change
is plainly ridiculous (as proof: transaction volume has changed, and multiple changes have been successfully made that increase the peak volume), and is also covered by your:
>AFAIK The number of transactions per block and the rate at which blocks are confirmed has nothing to do with how many people are burning through hashes.
as for:
>the energy consumption rises as a function of the price, with no upper bound.
though there's obviously some relation to price and electricity use (i.e. hashing power, ignoring tech improvements), that direct relation really only makes sense with the per-block rewards... which keep halving, and that does not immediately lead to 1/2 hashing power. the market has repeatedly demonstrated that price and value-per-block do not directly relate to hashing/electricity. on top of that, transaction fees are taking a larger and larger proportion of it, and that's related pretty much solely to transaction volume (which does not noticeably affect electricity, as you pointed out), not value per coin or electricity.
as far as "no upper bound"... only if you ignore market effects, like if electricity became free globally. since it's market-driven though, as beyond a certain point it's not profitable, you can't ignore that. and again, hashing power has dropped many times in the past, clearly demonstrating effective upper bounds at any given time.
This fact should stay true for another 2-3 halvings (including same energy consumption if price doubles which is the same), until the factor 0.5 (energy consumption after halving) starts to increase to 1 when/if higher fees compensate for the diminished issuance of new coins (while issuance of new coins goes to 0).
Because fees for now are very low, in the big picture and almost not relevant in the power consumption calculstions.
But until these about 2-4 halvings happen (=Y), price might increased by factor X and energy consumption only X/2^Y (which could even be a decrease if price does not go up much!). And if price would stay the same, then energy consumption would actually drop by 50% every halving! (if all other things being equal and supply of miners and mining chips were not a problem).
So to sum it up differently: Bitcoin consumes a lot of energy to have a fair new issuance of coins. Instead of being created out of nothing and being distributed unfairly (worldwide privacy issuance of a new coin is REALISTICALLY very very very hard, and has been tried by many projects and all failed), bitcoin gives you new coins for the same amount that you burn energy, so you can‘t fake it or corrupt it in the hands of politicians or any other left/right/religious/… group
> Or take banks. I was amazed to see how much manual work is done in financial institutions. Skyscrapers with bank name on top of it filled with tens of thousands people. Everyone has computer, among other things burning electricity. Separately, datacenters. How does it compares to crypto? I doubt it's less, if sum up all banks.
You'd be likely wrong. Bitcoin now uses the same energy as the whole country of Argentina with 43 million people. For comparison Bank of America has 200 000 employees. Are there more than 200 banks of that size, maybe but I'm doubtful. Moreover Argentinas energy consumption includes vastly more energy intensive endeavours than banking (manufacturing, mining etc). from that estimate I would be very doubtful that the whole banking sector uses more energy than bitcoin mining. Moreover as others pointed out the banking sector serves many more people with many services that bitcoin can't provide.
From there the more the "outside"/"inside" line gets blurry (e.g. what if it was synced from Dropbox ? or data got injected by an arbitrary program etc.), the more it becomes justified to just scan every file moving anywhere. If the goal is indeed to scan files in the first place.
--
[in, optional] hTemplateFile
A valid handle to a template file with the GENERIC_READ access right. The template file supplies file attributes and extended attributes for the file that is being created.
For other operating systems, sure, but the Win32 API has a function literally called CopyFile (and its variants CopyFileEx and CopyFileTransacted).
https://groups.google.com/g/mozilla.dev.platform/c/yupx2ToQ5...
https://gregoryszorc.com/blog/2021/04/06/surprisingly-slow/
and the bug link:
https://www.mercurial-scm.org/repo/hg/rev/2fdbf22a1b63f7b4c9...
On the other hand, i can't help but to wonder about why we don't see more anti virus/malware scanning solutions for GNU/Linux, especially with how coupled our development workflows are to the Internet - i've had Ruby gems with malware in them be stopped by Kaspersky on Windows, and honestly the thought of pip, npm and many other package managers being able to compile god knows what and execute random scripts in a non-sandboxed environment is horrifying.
Market share aside, i bet we still see malware targeting *nix be developed, especially in the age of pre-compiled binary blobs and such, especially when the complexity of everything increases to the point where you can't audit everything that's present with your current resources, which will probably only become a larger problem with time.
So, why don't we have an equivalent to Windows Defender that's either preinstalled or recommended during installation, like you can choose between different desktops while installing distros? Why don't we talk more about something like https://www.kaspersky.com/small-to-medium-business-security/... ?
So you copy a buffer full (64k?) of bytes, and mcafee scans the full folder. Then you copy another buffer full, and it scans the full folder again. And so on.
I saw the windows estimated copy time go down from multiple days to a few minutes by adding an exclusion on a folder.
Another fun McAfee tip is to keep your recycle bin as empty as possible, especially for zip files, because windows will look at the content regularly, so mcafee keeps on scanning it again and again.
Here's my favourite one, which was even supported by the man himself: uninstall it as soon as possible!
It's not only a pretty bad antivirus, but seems to be straight up dangerous, having had some of the most destructive bugs I've seen in any software (like the time it bootlooped millions of PCs around the world- including hospitals and police stations!). There are so many better options available, I'm amazed anyone actually uses it (unless 100% of their install base is people who got it preinstalled).
McAfee's users are not the people who suffer it on their PC, but the manager who love a big name and hate a migration, and the windows domain admins who love the centralized console. The damage caused by user frustration, lost time waiting, troubleshooting, and actual hardware obsolete before its time is not their concern.
I can tell from experience the windows domain admins disable it on their own laptop, as they 'know what they are doing', unlike the rest of us.
It worked perfectly, except on one machine, where the document could be downloaded but LibreOffice raised an error when opening it.
At first I though I had a bug. Checked my code, nope.
Then I though maybe there is a problem with LO, but no, same version, nothing special. It worked with a document I brough from an USB disk.
After an afternoon of frustration I noted Kaspersky running in the task bar, and did one last desperate attempt at finding the solution by disabling it.
It worked.
Inspecting the file revealed some parts were missing, Kaspersky assumed it was a malware, and not only intercepted the download, but removed silently part of the data on the fly.
No alarm, no pop up, just a broken file.
Disabling the antivirus was not acceptable for the client, so I created a self signed certificate, and turned https on.
The virtual vigilante couldn't spy on the wire anymore, and the user could download her files, unharmed.
I copied a bit-for-bit identical version of the file from a different machine into the correct directory, and bizarrely that worked fine.
While my summary here is brief, debugging this whole mess took a while.
It also shows how useless most AV is.
https://www.av-comparatives.org/tests/performance-test-octob...
[0] https://groups.google.com/g/comp.os.msdos.programmer/c/ffAVU...
Wow, so the second field of every timestamp in a ZIP file must be an even number? That's shocking to me! It seems that RAR and FAT32 share this problem. How could I not know this?
- by modern standards.
The really impressive thing is that our industry has managed to paper over most relics from The Olden Days to the point where this discovery is surprising!
https://github.com/PaulCapron/pwa2uwp/blob/master/src/zip.js in its entirety provides a simple intro, with code, to the ZIP format (archiving only, with no compression)
* https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
* Via: https://support.pkware.com/home/pkzip/developer-tools/appnot...
6.3.9 was released July 15, 2020.
OHH that's why it's called omni.ja.. But why was it "jar" in the first place, for a thing that's not Java?
Did you know you can have multiple zip entries with the same path? Ask me how I found out.
(I owned the JAR code for a few years after Taras left Mozilla)
For those who dont know Taras was part of Project MemShrink and Project Snappy and lots of other pref issues. ( I think he also worked on profiling? ) A lot of those were what made Firefox useable before e10s and Quantum landed.
https://graphics.pixar.com/usd/release/wp_usdz.html#layout
Basically, important stuff first, no compression and 64 byte alignment