From 01d9acea6bedc6a66bc35eb9984b39eb9c181d7d Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Sat, 25 Apr 2020 09:29:24 +0000
Subject: [PATCH] Performance optimization: avoid use of Frame.clear(), use
 Frame.home() and Frame.cleartoeol()'s instead.

---
 exec/avatar_chooser.js | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/exec/avatar_chooser.js b/exec/avatar_chooser.js
index 56489b0929..65df9d48ec 100644
--- a/exec/avatar_chooser.js
+++ b/exec/avatar_chooser.js
@@ -335,11 +335,15 @@ function CollectionLister(dir, parent_frame) {
 
 	function display_collection_info(sauce, fn) {
 
-		frames.info.clear();
-		frames.info.putmsg('Author: ' + (sauce.author.length ? sauce.author : 'Unknown') + '\r\n');
-		frames.info.putmsg('Group: ' + (sauce.group.length ? sauce.group : 'Unknown') + '\r\n');
-		frames.info.putmsg('Avatars: ' + Math.floor(sauce.rows / avatar_lib.defs.height) + '\r\n');
-		frames.info.putmsg('ICE Colors: ' + (sauce.ice_color ? 'Yes' : 'No') + '\r\n');
+		function crlf() {
+			frames.info.cleartoeol();
+			frames.info.crlf();
+		}
+		frames.info.home();
+		frames.info.putmsg('Author: ' + (sauce.author.length ? sauce.author : 'Unknown')); crlf();
+		frames.info.putmsg('Group: ' + (sauce.group.length ? sauce.group : 'Unknown')); crlf();
+		frames.info.putmsg('Avatars: ' + Math.floor(sauce.rows / avatar_lib.defs.height)); crlf();
+		frames.info.putmsg('ICE Colors: ' + (sauce.ice_color ? 'Yes' : 'No')); crlf();
 		frames.info.putmsg('Updated: ' + sauce.date.toLocaleDateString());
 
         const f = new File(fn);
-- 
GitLab