Bitcoin Forum
September 27, 2016, 08:39:07 PM *
News: Due to DDoS attacks, there may be periodic downtime.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: svn rev 181, 182 and 183  (Read 843 times)
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
November 18, 2010, 12:24:45 AM
 #1

It'd been a while since I shot myself in my foot, so I guess I was overdue.

Anyhow, on my third attempt I think I've got it right-- I fixed a bug that was causing Bitcoin to be unusably slow on Macs running FileVault (the built-in filesystem encryption on the Mac).

The problem was Bitcoin opening and then closing the debug.log file on every write.  After a couple of "too clever for my own good" solutions that broke, or could break, in interesting ways, the code now opens debug.log and simply keeps it open, constantly appending to it.

If you run a bitcoind server, see the "don't forget to rotate your logs" thread for what you need to do for log rotation to work properly.

How often do you get the chance to work on a potentially world-changing project?
1475008747
Hero Member
*
Offline Offline

Posts: 1475008747

View Profile Personal Message (Offline)

Ignore
1475008747
Reply with quote  #2

1475008747
Report to moderator
1475008747
Hero Member
*
Offline Offline

Posts: 1475008747

View Profile Personal Message (Offline)

Ignore
1475008747
Reply with quote  #2

1475008747
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1475008747
Hero Member
*
Offline Offline

Posts: 1475008747

View Profile Personal Message (Offline)

Ignore
1475008747
Reply with quote  #2

1475008747
Report to moderator
1475008747
Hero Member
*
Offline Offline

Posts: 1475008747

View Profile Personal Message (Offline)

Ignore
1475008747
Reply with quote  #2

1475008747
Report to moderator
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 798

No Maps for These Territories


View Profile
November 18, 2010, 08:11:46 AM
 #2

The problem was Bitcoin opening and then closing the debug.log file on every write.  After a couple of "too clever for my own good" solutions that broke, or could break, in interesting ways, the code now opens debug.log and simply keeps it open, constantly appending to it.
Indeed, fflush is good enough to make sure the data gets written, constantly reopening/closing the file won't do anything beyond that.

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!