8000 Delay in flushLogStr introduces unwanted pauses · Issue #41 · freckle/blammo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Delay in flushLogStr introduces unwanted pauses #41
Closed
@chris-martin

Description

@chris-martin

runLoggerLoggingT flushes at the end of the action. As of Blammo-1.1.2.3, this means that it incurs a 0.1-second thread delay. This means that, for example, if you have an app setup that looks like this:

loadApp f = checkpointCallStack $ do
  appSettings@AppSettings {..} <- loadAppSettings
  initialFaktorySettings <- Faktory.envSettings
  appLogger <- newLogger appLogSettings
  appAwsEnv <- runLoggerLoggingT appLogger AWS.envDiscover
  appSqlPool <- runLoggerLoggingT appLogger makePostgresPool
  _...

... This seems like a reasonable thing to write, but it incurs 0.2 seconds of unnecessary pausing. It seems that runLoggerLoggingT carries the unstated assumption that it will only be run once, at the outermost layer of an application, and this does not seem to hold true in the wild. Blammo-1.1.2.3 would be an unacceptable performance regression for us and probably for others, and I think we ought to deprecate it.

cc @pbrisbin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0