mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 11:35:48 +00:00
terminal: lower default kitty image storage limit for libghostty
The default kitty image storage limit was 320 MB for all build artifacts. For libghostty, this is overly generous since it is an embedded library where conservative memory usage is preferred. Lower the default to 10 MB when building as the lib artifact while keeping the 320 MB default for the full Ghostty application.
This commit is contained in:
@@ -255,7 +255,10 @@ pub const Options = struct {
|
||||
|
||||
/// The total storage limit for Kitty images in bytes for this
|
||||
/// screen. Kitty image storage is per-screen.
|
||||
kitty_image_storage_limit: usize = 320 * 1000 * 1000, // 320MB
|
||||
kitty_image_storage_limit: usize = switch (build_options.artifact) {
|
||||
.ghostty => 320 * 1000 * 1000, // 320MB
|
||||
.lib => 10 * 1000 * 1000, // 10MB
|
||||
},
|
||||
|
||||
/// The limits for what medium types are allowed for Kitty image loading.
|
||||
kitty_image_loading_limits: if (build_options.kitty_graphics)
|
||||
|
||||
@@ -194,7 +194,14 @@ pub const Options = struct {
|
||||
|
||||
/// The total storage limit for Kitty images in bytes. Has no effect
|
||||
/// if kitty images are disabled at build-time.
|
||||
kitty_image_storage_limit: usize = 320 * 1000 * 1000, // 320MB
|
||||
kitty_image_storage_limit: usize = switch (build_options.artifact) {
|
||||
.ghostty => 320 * 1000 * 1000, // 320MB
|
||||
|
||||
// libghostty we start with a much lower limit since this is an
|
||||
// embedded library and we want to be more conservative with memory
|
||||
// usage by default.
|
||||
.lib => 10 * 1000 * 1000, // 10MB
|
||||
},
|
||||
|
||||
/// The limits for what medium types are allowed for Kitty image loading.
|
||||
/// Has no effect if kitty images are disabled otherwise. For example,
|
||||
|
||||
Reference in New Issue
Block a user