1
0
mirror of https://github.com/gryf/tabbedalt.git synced 2025-12-17 11:30:31 +01:00

Workaround for memory consumption in copying X properties.

This commit is contained in:
2010-08-28 10:51:44 +02:00
parent d2e63553ef
commit e66a87f2ce

26
tabbed
View File

@@ -73,6 +73,21 @@
# - name of the tab, it could be anything but the pipe. # - name of the tab, it could be anything but the pipe.
# - optional command. If omitted, simple shell will be launched. # - optional command. If omitted, simple shell will be launched.
# #
# 2010-08-28 10:17:02
# - Removed tab_property_notify hook, because in certain circumstances it
# provides memory consumption. It is especially well seen by running
# mocp[1] and play internet radio station (i.e digitalgunfire.com, but
# there can be others). Observe memory taken by urxvt with top or ps. Also,
# original tabbed extension is affected.
#
# This change will affect i.e. dynamic font change - it will not expand window
# to reflect size of a font. Switching to next tab and back will rearrange
# content of a tab to current window size.
#
# If anyone have a better idea how to fix memory consumption which is taking
# place in copy_properties(), please step forward :)
#
# [1] http://moc.daper.net
sub tab_activity_mark ($$) { sub tab_activity_mark ($$) {
@@ -545,15 +560,6 @@ sub tab_key_press {
(); ();
} }
sub tab_property_notify {
my ($self, $tab, $event) = @_;
$self->copy_properties
if $event->{window} == $tab->parent;
();
}
sub tab_add_lines { sub tab_add_lines {
my ($self, $tab) = @_; my ($self, $tab) = @_;
@@ -570,7 +576,7 @@ package urxvt::ext::tabbed::tab;
# simply proxies all interesting calls back to the tabbed class. # simply proxies all interesting calls back to the tabbed class.
{ {
for my $hook qw(start destroy key_press property_notify add_lines) { for my $hook qw(start destroy key_press add_lines) {
eval qq{ eval qq{
sub on_$hook { sub on_$hook {
my \$parent = \$_[0]{term}{parent} my \$parent = \$_[0]{term}{parent}