• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

trunk (944) issues

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby datacompboy » Thu Feb 08, 2007 6:18 pm

1. themes/default/style.css == contains PHP code, that (of course) does not execute :)
it should be named or style.css.php, or there should be .htaccess that makes css executed with php (will not work on non-apache servers, or servers behind an static proxies).
2. src/commands/ban.class.php
if I'm right, trim() are not needed since move to new paramaters parser, so
Code: Select all
--- src/commands/ban.class.php  (revision 944)           
+++ src/commands/ban.class.php  (working copy)           
@@ -18,7 +18,7 @@                                         
     $c =& $this->c;                                     
     $u =& $this->u;                                     
                                                         
-    $nick   = isset($params[0]) ? trim($params[0]) : '';
+    $nick   = isset($params[0]) ? ($params[0]) : '';     
     $reason = isset($params[1]) ? $params[1] : '';       
     if ($reason == '') $reason = _pfc("no reason");     
     $channame = $u->channels[$recipientid]["name"];

(for myself, i have removed kick from ban command -- i'm use ban and kick separately)
3. src/commands/kick.class.php
same 'trim' patch as above.
4. src/containers/mysql.class.php
since `server` is recommend to md5(_FILE_), better to limit `server` field to 32 chars. The less size of index -- the faster search!
group/subgroup/leaf -- also, may be limit to a bit less, than 256? On mine chat i'm use:
Code: Select all
   var $_sql_create_table = "                       
  ";

That slight speed-up system, but still "usign temporary; using filesort" here. I think, this because of TEXT column, may be for speedup move text to separate table, and select it with join?


For example, one used query:
Code: Select all
EXPLAIN SELECT `leaf` , `timestamp`
FROM u43471.freechat
WHERE `server` = 'a7cadd6352026d04d4133315cc20deaf'
AND `group` = 'channelid-to-msg'
AND `subgroup` = 'ch_%D0%92%D1%81%D0%B5'
GROUP BY `leaf`
ORDER BY timestamp

"GROUP BY" from it MUST be removed in that case -- and "Using temporary" from explain query have gone
So, looks like SQL should be not generic, but constructed for all possible varations and tuned...


I have played with database in queries, the maximum perfomance get if add one index:
Code: Select all
ALTER TABLE `freechat` ADD INDEX ( `server` , `group` , `subgroup` , `timestamp` )

And remove "group by" from query -- then, query took 10 times less time! :) And only "Using where". No "using temporary", no "using filesort".

5. data/public/js/pfcgui.js
add into loadSmileyBox after
container.appendChild(img);
this:
Code: Select all
container.appendChild(document.createTextNode(' '));

so smileys will wrap fine if lot of smiles in theme.
Last edited by datacompboy on Thu Feb 08, 2007 6:20 pm, edited 1 time in total.
-- suicide proc nearn call deathn suicide endp
datacompboy
Member
 
Posts: 74
Joined: Thu Jan 18, 2007 9:10 pm
Location: Novosibirsk
  • Website
  • ICQ
Top

Postby phpfreechat » Fri Feb 09, 2007 11:22 am

Thank you for your suggestions.
I just integrated your fixes in the lastest trunk (rev 946)

Feel free to report any feedback about it.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 18 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub