Subject: CVS domivogt: * Implemented a more aggressive style merging algorithm. Now, styles are

From: CVS <[email-masked]>
Date: Wed, 23 Feb 2000 12:42:48 -0600 (CST)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	domivogt	00/02/23 12:42:47

Modified files:
	.              : ChangeLog 
	fvwm           : fvwm.h style.c style.h 

Log message:
* Implemented a more aggressive style merging algorithm.  Now, styles are
deleted, if they are completely overridden by later style definitions with the
same name.  Two styles with the same name are merged together if the styles in
between share no style settings with the two styles.

Does this eliminate the theme's memory penalty?

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 24 Feb 2000 01:28:40 +0200

On 23 Feb 2000 12:42:48 -0600, CVS (dominik) wrote:
> 
> Log message:
> * Implemented a more aggressive style merging algorithm.  Now, styles
> are deleted, if they are completely overridden by later style
> definitions with the same name.  Two styles with the same name are
> merged together if the styles in between share no style settings with
> the two styles.

There are many style merging problems after this commit.
I didn't succeed to create a minimal config to show all problems, so I
am sending the Style lines of my rc file in hope that you can fix them.
The results are:
  * all windows have the same mini icon (Alt-Tab) the one of Style "*",
    Icon style options are ok, although I only use pairs (Icon, MiniIcon);
  * "sxterm" windows have Title, MouseFocus instead of NoTitle, NeverFocus;
  * the same with "panel"

Just tried something else. After the restart: Read iconstyles (the file
with only Icon, MiniIcon pairs), after some timeout and 10 internal errors
(Request 1, Error 2, EventType: 0) mini icons are now ok, but NoHandle and
NeverFocus style options of "FvwmCompactButtons" and "FvwmPager" are lost.

> Does this eliminate the theme's memory penalty?

Actually, fvwm now uses less memory than before, thanks to style merging.
And now after reapplying the same styles I see no memory lossage.
But style commands are not the only ones involved in the memory penalty.
I will send a report with numbers when the bugs above are fixed.

Regards,
Mikhael.

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 24 Feb 2000 01:48:13 +0200

Forgotten style lines from my rc file.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 24 Feb 2000 12:05:53 +0100

> NeverFocus style options of "FvwmCompactButtons" and "FvwmPager" are lost.

Sigh.  People are simply too fast testing my stuff :-)  On my way home
yesterday I realised the mistake I made but thought that nobody would
use a config complex enough to surface the bug over night.  Actually
I don't understand where all the problems you describe come from, but
the fix I intended to make anyway seems to fix all of them.

> I will send a report with numbers when the bugs above are fixed.

You'll have to check again with the fixes I made since they reduce
the amount of merging.

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 24 Feb 2000 15:29:32 +0200

> the fix I intended to make anyway seems to fix all of them.

After the latest fix all the described problems seem to be fixed, nice.

I have noticed one thing - rereading the famous iconstyles file
with ~238 style lines takes 15 seconds on my not-very-slow box.
The initial read takes a reasonable amount of time, because there is no
merging yet. I can understand this (for in while in for in while).
Maybe it is possible to create O(1) variants of blockor() and company?..

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 24 Feb 2000 14:53:48 +0100

> Maybe it is possible to create O(1) variants of blockor() and company?..

The problem is not the time that the block... function take.
The problem is that the whole algorithm in simplify_style_list
is O(n^4) in the worst case and O(n^3) in the best case.  If
you have 250 different styles this takes a lot of time.

Any ideas on how to improve the algorithm are very welcome.

Bye

Dominik ^_^