[Box Backup-commit] [boxbackup/boxbackup] 40e0bc: Refactor headers to reduce coupling

GitHub noreply at github.com
Thu Feb 15 22:17:13 GMT 2018


  Branch: refs/heads/s3_support
  Home:   https://github.com/boxbackup/boxbackup
  Commit: 40e0bc0d05ef752a4cfd8adc330e9635afec1da0
      https://github.com/boxbackup/boxbackup/commit/40e0bc0d05ef752a4cfd8adc330e9635afec1da0
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-15 (Thu, 15 Feb 2018)

  Changed paths:
    M lib/backupstore/BackupStoreDirectory.h
    M lib/bbackupd/BackupClientInodeToIDMap.h
    M lib/bbackupd/BackupDaemonInterface.h
    M lib/bbackupquery/BoxBackupCompareParams.h
    M lib/common/Box.h
    M lib/common/BoxException.h
    M lib/common/BoxTime.cpp
    M lib/common/BufferedStream.cpp
    M lib/common/BufferedStream.h
    M lib/common/BufferedWriteStream.cpp
    M lib/common/Configuration.h
    M lib/common/ConversionString.cpp
    M lib/common/DebugMemLeakFinder.cpp
    A lib/common/Exception.h
    M lib/common/FdGetLine.cpp
    M lib/common/FileStream.cpp
    M lib/common/FileStream.h
    M lib/common/Guards.h
    M lib/common/IOStreamGetLine.cpp
    M lib/common/LineBuffer.cpp
    M lib/common/LineBuffer.h
    M lib/common/Logging.cpp
    M lib/common/MainHelper.cpp
    M lib/common/MemLeakFindOn.h
    M lib/common/NamedLock.cpp
    M lib/common/PartialReadStream.cpp
    M lib/common/RateLimitingStream.cpp
    M lib/common/ReadGatherStream.cpp
    M lib/common/ReadLoggingStream.cpp
    M lib/common/StreamableMemBlock.cpp
    M lib/common/Test.cpp
    M lib/common/Timer.cpp
    M lib/common/UnixUser.cpp
    M lib/common/Utils.cpp
    M lib/common/WaitForEvent.cpp
    M lib/common/ZeroStream.cpp
    M lib/common/makeexception.pl.in
    M lib/compress/Compress.h
    M lib/compress/CompressStream.cpp
    M lib/crypto/CipherAES.cpp
    M lib/crypto/CipherBlowfish.cpp
    M lib/crypto/CipherContext.cpp
    M lib/crypto/CipherContext.h
    M lib/crypto/CipherDescription.h
    M lib/crypto/CryptoUtils.cpp
    M lib/crypto/MD5Digest.h
    M lib/crypto/Random.cpp
    M lib/httpserver/HTTPHeaders.cpp
    M lib/intercept/intercept.cpp
    M lib/raidfile/RaidFileController.cpp
    M lib/raidfile/RaidFileUtil.h
    M lib/server/LocalProcessStream.cpp
    M lib/server/Message.cpp
    M lib/server/Protocol.cpp
    M lib/server/ProtocolUncertainStream.cpp
    M lib/server/SSLLib.cpp
    M lib/server/Socket.cpp
    M lib/server/SocketListen.h
    M lib/server/SocketStream.cpp
    M lib/server/SocketStreamTLS.cpp
    M lib/server/TLSContext.cpp
    M lib/server/makeprotocol.pl.in

  Log Message:
  -----------
  Refactor headers to reduce coupling

Remove Logging and BoxException dependencies, ASSERT and THROW_* macros from
Box.h, move them into a new header, Exception.h (not to be confused with
BoxException.h, which just declares the BoxException class).

This unfortunately means that a lot of C++ files now need to include
Exception.h, and many more that silently depended on <string> being imported
now need to import it themselves, or just forward-declare it if they don't need
a definition.

Also simplify the logic for enabling memory leak detection. It's now always on
in debug builds unless disabled by defining PLATFORM_DISABLE_MEM_LEAK_TESTING
(which only Windows does) and always off in release builds.


  Commit: e2bf36214128a83b07cbd968ca2b51453685eb1a
      https://github.com/boxbackup/boxbackup/commit/e2bf36214128a83b07cbd968ca2b51453685eb1a
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-15 (Thu, 15 Feb 2018)

  Changed paths:
    M lib/common/LineBuffer.h

  Log Message:
  -----------
  LineBuffer.h: update header comment and #include guard for new filename


  Commit: 8026fd52e439a592ff0dd250b8981e74048c88d2
      https://github.com/boxbackup/boxbackup/commit/8026fd52e439a592ff0dd250b8981e74048c88d2
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-15 (Thu, 15 Feb 2018)

  Changed paths:
    M lib/common/Logging.cpp
    M lib/common/Logging.h
    M test/common/testcommon.cpp

  Log Message:
  -----------
  Logging: improve performance by not generating message unnecessarily

Avoid building an ostringstream, writing all logged values to it and converting
it to a string, for log messages that no logger is currently interested in
(e.g. TRACE logging most of the time). Cache this "lowest common log level" and
update it when any logger is reconfigured, added or removed.


  Commit: 991748f20cff34e140190320b83c0638e13bfc58
      https://github.com/boxbackup/boxbackup/commit/991748f20cff34e140190320b83c0638e13bfc58
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-02-15 (Thu, 15 Feb 2018)

  Changed paths:
    M lib/httpserver/HTTPQueryDecoder.cpp

  Log Message:
  -----------
  HTTPQueryDecoder::URLEncode: speed up by processing larger chunks

Scan the string for characters which need URL-encoding and append the substring
before that in one go. If the entire string does not need URL-encoding, just
return it without any further processing.


Compare: https://github.com/boxbackup/boxbackup/compare/c094e0c28656...991748f20cff


More information about the Boxbackup-commit mailing list