Skip to content

Commit

Permalink
enlarge filesystem buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Oct 14, 2021
1 parent 235f789 commit e4b7314
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/framework/FSPersistence.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class FSPersistence {
StatefulService<T> * statefulService,
FS * fs,
const char * filePath,
size_t bufferSize = DEFAULT_BUFFER_SIZE)
size_t bufferSize = FS_BUFFER_SIZE)
: _stateReader(stateReader)
, _stateUpdater(stateUpdater)
, _statefulService(statefulService)
Expand Down
4 changes: 4 additions & 0 deletions lib/framework/StatefulService.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#define DEFAULT_BUFFER_SIZE 2048
#endif

#ifndef FS_BUFFER_SIZE
#define FS_BUFFER_SIZE 4096
#endif

enum class StateUpdateResult {
CHANGED = 0, // The update changed the state and propagation should take place if required
UNCHANGED, // The state was unchanged, propagation should not take place
Expand Down
2 changes: 1 addition & 1 deletion lib_standalone/FSPersistence.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class FSPersistence {
StatefulService<T> * statefulService,
FS * fs,
const char * filePath,
size_t bufferSize = DEFAULT_BUFFER_SIZE)
size_t bufferSize = FS_BUFFER_SIZE)
: _stateReader(stateReader)
, _stateUpdater(stateUpdater)
, _statefulService(statefulService)
Expand Down
4 changes: 4 additions & 0 deletions lib_standalone/StatefulService.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#define DEFAULT_BUFFER_SIZE 2048
#endif

#ifndef FS_BUFFER_SIZE
#define FS_BUFFER_SIZE 4096
#endif

enum class StateUpdateResult {
CHANGED = 0, // The update changed the state and propagation should take place if required
UNCHANGED, // The state was unchanged, propagation should not take place
Expand Down

0 comments on commit e4b7314

Please sign in to comment.