Hi,
walking through roundcube's code I've found some room for small improvements.
if you sum them all together you may get some nice performance improvement
(not very huge - but you can probably notice it)
what I'm talking of are mainly style questions... because there are functions
in php that do the same as another function, with the small difference that
function X is faster
for example print() is slower than echo()
also double-quotes (") are up to 25% slower than concatenating strings
with single quotes (') - which is a HUGE performance boost
I've found a site which lists some of those functions - check [1]
I quickly compared the list with roundcube's codebase
those are the main places where there is still room for improvement:
* use ' instead of " (where possible - for example 'this is a test' . "\n"
would still be faster than "this is a test\n" - but you cannot replace
'"\n" by '\n')
* multiple parameters for echo - but most people prefer concatenating
over this multiple argument feature (I have to admit: I also prefer
string concatenation)
* pre-increment instead of post-increment (should be quite easy to do this,
since you need post-increment only in very few cases)
* unset() should be used more often (bigger task)
* use require() instead of require_once() - this is probably a bigger task too
one small note about [1]: afaik switch/case is faster than if/else
that site says the opposite
some of those things can be put into roundcube's codebase quite easily
maybe you can create some "Junior Jobs" section in your wiki, so bored
devs may write patches (which of course should be reviewed by an
experienced dev)
however, feel free to discuss this
oh, and I know: this whole mail is not mean for today's development...
but more something for the future
Regards,
Martin
[1] http://progtuts.info/55/php-optimization-tips/
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
I always read about localization updates on your mailing list
I started asking myself how translators know that they have
to translate something which was recently added?
do they check the interface and see "oh, there's text which is
not translated yet"?
or do they compare their locale with en_US ?
anyway, wouldn't it be easier if some (maybe I :)) wrote
some small PHP script that could easily compare multiple
localized include-files with each other?
if you want something like this feel free to tell me
Regards,
Martin
_______________________________________________
List info: http://lists.roundcube.net/dev/
Thanks Thomas!
The hook has meanwhile changed to "render_mailboxlist".
It works great on the mailbox list within the task "mail". It does not work on the subscription table.
Regards,
Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
I’ve attached the patch for the completed pt_BR localization.
Att.
- Denis
--- 8< --- detachments --- 8< ---
The following attachments have been detached and are available for viewing.
http://detached.gigo.com/rc/Bf/a6SuCK11/pt_BR.patch
Only click these links if you trust the sender, as well as this message.
--- 8< --- detachments --- 8< ---
_______________________________________________
List info: http://lists.roundcube.net/dev/
Oops... Btw, please CC the list (always).
On Sat, Jul 4, 2009 at 10:50 PM, till<klimpong(a)gmail.com> wrote:
> On Sat, Jul 4, 2009 at 10:09 PM, Tiago Gomes<algodas(a)gmail.com> wrote:
>> yes, I do , but the cpu HIGH Over continued, any Idea ? it ´s normal ?
>
> I hope that means the database error is gone. ;-)
>
> In general, RoundCube doesn't cause high loads for me. I'd suggest you
> run xdebug and generate some cachegrind files (through xdebug's
> profiler) to figure out what is going on. There could be a number of
> things slowing the webserver down.
>
> http://xdebug.org/docs/profiler
>
> Till
>
_______________________________________________
List info: http://lists.roundcube.net/dev/
Is there a way to localize the "Archive" folder? Regards, Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi all,
I think it might be a good idea to have a database table for
plugins.
If plugins needs to store some values currently this is
done
mostly by using 'users' table 'preferences' field.
I think it's
better to have a separate table.
The following structure should be
flexible enough. ------------------------------------------------------
CREATE TABLE IF NOT EXISTS `plugins` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`contact_id` int(11)
DEFAULT NULL,
`identity_id` int(11) DEFAULT NULL,
`plugin` text,
`key`
text,
`value` text,
`timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=latin1 AUTO_INCREMENT=1
;
-------------------------------------------------------- Any comments are
welcome. Regards, Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi devs, just wondering if this is normal:
Jun 29 16:36:03 roundcube-test roundcube: PHP Fatal error: Allowed
memory size of 104857600 bytes exhausted (tried to allocate 17100392
bytes) in /data/WWW/roundcubemail-2493/program/lib/Net/SMTP.php on
line 831
This is a 12MB attachment. That shouldnt be needing a total memory
footprint of 100+ MB. I had to move our memory limit up to 200MB just
to be able to send a 12MB attachment.
Regards,
Cor
_______________________________________________
List info: http://lists.roundcube.net/dev/
Folks,
I'm experiencing a very odd issue with a custom plug-in using the
authenticate hook. Here at our university we use a Web based single sign
on authentication called CAS (http://www.jasig.org/cas). I am trying to
write a plug-in to allow CAS to work with Roundcube proxying a connection
through imapproxy (http://www.imapproxy.org/).
The normal operation for authentication for IMAP by CAS service is to get
a one time use CAS ticket for every authentication. Since RC stores and
reuses the initial password CAS cannot work in direction connection to the
IMAP server. This is not an issue because when we proxy through imapproxy,
it holds open the imap connection by password/username combination.
So everything should be working great and superficially it seems okay,
that is until you try and delete an e-mail. It seems that a delete will
call the authenticate hook again and grab a new CAS ticket. The new CAS
ticket breaks the imapproxy connection identifier because the password is
now different. In turn this causes rc to have a "lost imap connection"
error.
The way I look at it I have 2 possibilities:
1. Figure a way out to only request the CAS ticket once in the plugin.
I'm guessing do a check for existing ticket before requesting.
This is the quick fix, but feels like a "duct tape" solution for what
might be a larger issue in extending RC for alternative authentication
mechanisms.
2. Extend RC so that instead of caching a password, it uses a password
recall function that can has an exec handler for custom plug-ins
$rcmail->auth->getpass() returns a clear text password and has an exec
handler for password return. Default it would be an abstraction of the
decrypt session password to keep current functionality
The value with option two is it would allow plug-in authors to
authenticate to peripheral services like managesieve with out limiting
alternative authentication methods.
I've included the current sort of working plugin for anyones interest.
--
Robert King
System Administrator
Computing & Communications
Memorial University
--- 8< --- detachments --- 8< ---
The following attachments have been detached and are available for viewing.
http://detached.gigo.com/rc/BK/UGmCcQQp/casauth.php
Only click these links if you trust the sender, as well as this message.
--- 8< --- detachments --- 8< ---
_______________________________________________
List info: http://lists.roundcube.net/dev/