[Box Backup-commit] [boxbackup/boxbackup] 346d97: Refactor headers to reduce coupling

GitHub noreply at github.com
Thu Feb 15 22:47:27 GMT 2018

  Branch: refs/heads/s3_support
  Home:   https://github.com/boxbackup/boxbackup
  Commit: 346d970b2ae2f7ebf9c13fb13b788f999a50975e
  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/bbackupd/Win32ServiceFunctions.cpp
    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/WinNamedPipeStream.h
    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: 67c2b4ec8afdf09b00dbe4003aadac5f042f4b30
  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: c18c0be7cb064249e801fa5ab4a29b55393799c5
  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: 1d77b48201ea32bec6e08e0a543f36ec4ab85bad
  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/991748f20cff...1d77b48201ea

More information about the Boxbackup-commit mailing list