Skip to content

2.7.1-Windows

Choose a tag to compare

@izolini izolini released this 16 Oct 16:59
· 7 commits to main since this release
012bccd

Performance enhancements: optimize runtime footprint and fix autoclose race condition (v2.7.1)

  • Fix data race on autoclose flag: replaced unguarded global bool with
    atomic.Bool field on App struct, eliminating concurrent read/write
    between the monitoring goroutine and AutoClose()
  • Cache exe directory via sync.Once (getExeDir): removed repeated
    os.Executable() syscalls from getCacheDir, setupLogging, ReadLogFile
    and NewApp — most notably from the asset server hot path, which was
    called on every image request from the WebView2 gallery
  • Cache GetAppInfo result via sync.Once: wails.json is embedded at
    compile time and never changes; json.Unmarshal now runs only once
  • Cache isAdmin result via sync.Once and promote IsUserAnAdmin to a
    package-level proc var, consistent with all other Win32 proc declarations
  • Eliminate redundant file open in processAndResizeImage: image is now
    opened once; io.Seek(0, SeekStart) rewinds the reader when a full
    decode is needed, removing a second syscall on every image cache write