[GH-ISSUE #165] Container might not need to calculate area size upon construction #97

Closed
opened 2026-03-03 16:22:20 +03:00 by kerem · 1 comment
Owner

Originally created by @mum4k on GitHub (Mar 3, 2019).
Original GitHub issue: https://github.com/mum4k/termdash/issues/165

Originally assigned to: @mum4k on GitHub.

When the container is created, it pre-calculates areas for the root:

github.com/mum4k/termdash@275d95ad41/container/container.go (L79)

And for any children:
github.com/mum4k/termdash@275d95ad41/container/container.go (L164)
github.com/mum4k/termdash@275d95ad41/container/container.go (L174)

This is likely redundant, since the first time Draw() is called, the areas are recalculated again.
github.com/mum4k/termdash@275d95ad41/container/draw.go (L36)
github.com/mum4k/termdash@275d95ad41/container/draw.go (L44-L48)

If that is so, this should be removed and just set to image.ZR at initialization to avoid any confusion.

Originally created by @mum4k on GitHub (Mar 3, 2019). Original GitHub issue: https://github.com/mum4k/termdash/issues/165 Originally assigned to: @mum4k on GitHub. When the container is created, it pre-calculates areas for the root: https://github.com/mum4k/termdash/blob/275d95ad418b6ecca8817de4b013b440fc9abbe6/container/container.go#L79 And for any children: https://github.com/mum4k/termdash/blob/275d95ad418b6ecca8817de4b013b440fc9abbe6/container/container.go#L164 https://github.com/mum4k/termdash/blob/275d95ad418b6ecca8817de4b013b440fc9abbe6/container/container.go#L174 This is likely redundant, since the first time Draw() is called, the areas are recalculated again. https://github.com/mum4k/termdash/blob/275d95ad418b6ecca8817de4b013b440fc9abbe6/container/draw.go#L36 https://github.com/mum4k/termdash/blob/275d95ad418b6ecca8817de4b013b440fc9abbe6/container/draw.go#L44-L48 If that is so, this should be removed and just set to image.ZR at initialization to avoid any confusion.
kerem 2026-03-03 16:22:20 +03:00
  • closed this issue
  • added the
    cleanup
    label
Author
Owner

@mum4k commented on GitHub (Mar 29, 2019):

This blocks #67 and needs to be resolved first.

<!-- gh-comment-id:477837589 --> @mum4k commented on GitHub (Mar 29, 2019): This blocks #67 and needs to be resolved first.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termdash#97
No description provided.