Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: dev

[DBMail 0000926]: LIST command is too slow (mailboxes_by_regex SQL is slow)

 

 

DBMail dev RSS feed   Index | Next | Previous | View Threaded


bugtrack at dbmail

Apr 5, 2012, 6:20 AM

Post #1 of 5 (377 views)
Permalink
[DBMail 0000926]: LIST command is too slow (mailboxes_by_regex SQL is slow)

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=926
======================================================================
Reported By: vampyre
Assigned To:
======================================================================
Project: DBMail
Issue ID: 926
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 20-Sep-11 13:12 CEST
Last Modified: 05-Apr-12 15:20 CEST
======================================================================
Summary: LIST command is too slow (mailboxes_by_regex SQL is
slow)
Description:
LIST is often used imap command, at least in some webmail and if the
execution takes 3 seconds it is really hard to work.

Is it possible to speed up the SQL?
======================================================================

----------------------------------------------------------------------
(0003430) vampyre (reporter) - 05-Apr-12 15:20
http://www.dbmail.org/mantis/view.php?id=926#c3430
----------------------------------------------------------------------
Hello Paul,

As I can see the main use of dbmail_acl is to provide the "shared folders"
functionality.

My question is, can we do this configurable?
I meen the option like DBMAIL.check_acl which will be enabled by default
but can be disabled in config.

This will allow us to simplify the SQL like:
===
SELECT distinct(mbx.name), mbx.mailbox_idnr, mbx.owner_idnr FROM
dbmail_mailboxes mbx WHERE 1=1 AND mbx.owner_idnr=?;
===

Please let me know if this is acceptable so I can send you a patch.

Thank you.

Issue History
Date Modified Username Field Change
======================================================================
20-Sep-11 13:12 vampyre New Issue
05-Apr-12 15:20 vampyre Note Added: 0003430
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev


bugtrack at dbmail

Apr 5, 2012, 7:07 AM

Post #2 of 5 (351 views)
Permalink
[DBMail 0000926]: LIST command is too slow (mailboxes_by_regex SQL is slow) [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=926
======================================================================
Reported By: vampyre
Assigned To:
======================================================================
Project: DBMail
Issue ID: 926
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 20-Sep-11 13:12 CEST
Last Modified: 05-Apr-12 16:07 CEST
======================================================================
Summary: LIST command is too slow (mailboxes_by_regex SQL is
slow)
Description:
LIST is often used imap command, at least in some webmail and if the
execution takes 3 seconds it is really hard to work.

Is it possible to speed up the SQL?
======================================================================

----------------------------------------------------------------------
(0003430) vampyre (reporter) - 05-Apr-12 15:20
http://www.dbmail.org/mantis/view.php?id=926#c3430
----------------------------------------------------------------------
Hello Paul,

As I can see the main use of dbmail_acl is to provide the "shared folders"
functionality.

My question is, can we do this configurable?
I meen the option like DBMAIL.check_acl which will be enabled by default
but can be disabled in config.

This will allow us to simplify the SQL like:
===
SELECT distinct(mbx.name), mbx.mailbox_idnr, mbx.owner_idnr FROM
dbmail_mailboxes mbx WHERE 1=1 AND mbx.owner_idnr=?;
===

Please let me know if this is acceptable so I can send you a patch.

Thank you.

----------------------------------------------------------------------
(0003431) paul (administrator) - 05-Apr-12 16:07
http://www.dbmail.org/mantis/view.php?id=926#c3431
----------------------------------------------------------------------
I don't have any problem with that. Just make sure the CAPABILITY is
updated accordingly.

Issue History
Date Modified Username Field Change
======================================================================
20-Sep-11 13:12 vampyre New Issue
05-Apr-12 15:20 vampyre Note Added: 0003430
05-Apr-12 16:07 paul Note Added: 0003431
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev


bugtrack at dbmail

Apr 9, 2012, 2:48 AM

Post #3 of 5 (337 views)
Permalink
[DBMail 0000926]: LIST command is too slow (mailboxes_by_regex SQL is slow) [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=926
======================================================================
Reported By: vampyre
Assigned To:
======================================================================
Project: DBMail
Issue ID: 926
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 20-Sep-11 13:12 CEST
Last Modified: 09-Apr-12 11:48 CEST
======================================================================
Summary: LIST command is too slow (mailboxes_by_regex SQL is
slow)
Description:
LIST is often used imap command, at least in some webmail and if the
execution takes 3 seconds it is really hard to work.

Is it possible to speed up the SQL?
======================================================================

----------------------------------------------------------------------
(0003430) vampyre (reporter) - 05-Apr-12 15:20
http://www.dbmail.org/mantis/view.php?id=926#c3430
----------------------------------------------------------------------
Hello Paul,

As I can see the main use of dbmail_acl is to provide the "shared folders"
functionality.

My question is, can we do this configurable?
I meen the option like DBMAIL.check_acl which will be enabled by default
but can be disabled in config.

This will allow us to simplify the SQL like:
===
SELECT distinct(mbx.name), mbx.mailbox_idnr, mbx.owner_idnr FROM
dbmail_mailboxes mbx WHERE 1=1 AND mbx.owner_idnr=?;
===

Please let me know if this is acceptable so I can send you a patch.

Thank you.

----------------------------------------------------------------------
(0003431) paul (administrator) - 05-Apr-12 16:07
http://www.dbmail.org/mantis/view.php?id=926#c3431
----------------------------------------------------------------------
I don't have any problem with that. Just make sure the CAPABILITY is
updated accordingly.

----------------------------------------------------------------------
(0003434) vampyre (reporter) - 09-Apr-12 11:48
http://www.dbmail.org/mantis/view.php?id=926#c3434
----------------------------------------------------------------------
Hello Paul,

I have enclosed the patch for configuring the ACL behavior. I've also put
the IMAP related attributes in one structure.

Could you please take a look and inform me if something should be
corrected.

Thank you.

Issue History
Date Modified Username Field Change
======================================================================
20-Sep-11 13:12 vampyre New Issue
05-Apr-12 15:20 vampyre Note Added: 0003430
05-Apr-12 16:07 paul Note Added: 0003431
09-Apr-12 11:45 vampyre File Added: 0000926.patch
09-Apr-12 11:48 vampyre Note Added: 0003434
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev


bugtrack at dbmail

Apr 9, 2012, 4:17 AM

Post #4 of 5 (338 views)
Permalink
[DBMail 0000926]: LIST command is too slow (mailboxes_by_regex SQL is slow) [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=926
======================================================================
Reported By: vampyre
Assigned To:
======================================================================
Project: DBMail
Issue ID: 926
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 20-Sep-11 13:12 CEST
Last Modified: 09-Apr-12 13:17 CEST
======================================================================
Summary: LIST command is too slow (mailboxes_by_regex SQL is
slow)
Description:
LIST is often used imap command, at least in some webmail and if the
execution takes 3 seconds it is really hard to work.

Is it possible to speed up the SQL?
======================================================================

----------------------------------------------------------------------
(0003430) vampyre (reporter) - 05-Apr-12 15:20
http://www.dbmail.org/mantis/view.php?id=926#c3430
----------------------------------------------------------------------
Hello Paul,

As I can see the main use of dbmail_acl is to provide the "shared folders"
functionality.

My question is, can we do this configurable?
I meen the option like DBMAIL.check_acl which will be enabled by default
but can be disabled in config.

This will allow us to simplify the SQL like:
===
SELECT distinct(mbx.name), mbx.mailbox_idnr, mbx.owner_idnr FROM
dbmail_mailboxes mbx WHERE 1=1 AND mbx.owner_idnr=?;
===

Please let me know if this is acceptable so I can send you a patch.

Thank you.

----------------------------------------------------------------------
(0003431) paul (administrator) - 05-Apr-12 16:07
http://www.dbmail.org/mantis/view.php?id=926#c3431
----------------------------------------------------------------------
I don't have any problem with that. Just make sure the CAPABILITY is
updated accordingly.

----------------------------------------------------------------------
(0003434) vampyre (reporter) - 09-Apr-12 11:48
http://www.dbmail.org/mantis/view.php?id=926#c3434
----------------------------------------------------------------------
Hello Paul,

I have enclosed the patch for configuring the ACL behavior. I've also put
the IMAP related attributes in one structure.

Could you please take a look and inform me if something should be
corrected.

Thank you.

----------------------------------------------------------------------
(0003437) paul (administrator) - 09-Apr-12 13:17
http://www.dbmail.org/mantis/view.php?id=926#c3437
----------------------------------------------------------------------
Stanislav,

You're almost there.

First off: new variables and declarations should take note of
http://www.dbmail.org/mantis/view.php?id=967.

_imap_params: please avoid variables starting with '_'
imap_param_t: avoid _t postfixes on declarations

I will clean up the existing stuff, but new things should abide also.


Finally, I see a lot of these:

+ if (_imap_params.check_acl && mailbox_check_acl(self,
self->mailbox->mbstate, ACL_RIGHT_READ) == 1) {

I think the check should be moved into mailbox_check_acl.

Issue History
Date Modified Username Field Change
======================================================================
20-Sep-11 13:12 vampyre New Issue
05-Apr-12 15:20 vampyre Note Added: 0003430
05-Apr-12 16:07 paul Note Added: 0003431
09-Apr-12 11:45 vampyre File Added: 0000926.patch
09-Apr-12 11:48 vampyre Note Added: 0003434
09-Apr-12 13:17 paul Note Added: 0003437
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev


bugtrack at dbmail

Apr 9, 2012, 7:13 AM

Post #5 of 5 (345 views)
Permalink
[DBMail 0000926]: LIST command is too slow (mailboxes_by_regex SQL is slow) [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=926
======================================================================
Reported By: vampyre
Assigned To:
======================================================================
Project: DBMail
Issue ID: 926
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 20-Sep-11 13:12 CEST
Last Modified: 09-Apr-12 16:13 CEST
======================================================================
Summary: LIST command is too slow (mailboxes_by_regex SQL is
slow)
Description:
LIST is often used imap command, at least in some webmail and if the
execution takes 3 seconds it is really hard to work.

Is it possible to speed up the SQL?
======================================================================

----------------------------------------------------------------------
(0003430) vampyre (reporter) - 05-Apr-12 15:20
http://www.dbmail.org/mantis/view.php?id=926#c3430
----------------------------------------------------------------------
Hello Paul,

As I can see the main use of dbmail_acl is to provide the "shared folders"
functionality.

My question is, can we do this configurable?
I meen the option like DBMAIL.check_acl which will be enabled by default
but can be disabled in config.

This will allow us to simplify the SQL like:
===
SELECT distinct(mbx.name), mbx.mailbox_idnr, mbx.owner_idnr FROM
dbmail_mailboxes mbx WHERE 1=1 AND mbx.owner_idnr=?;
===

Please let me know if this is acceptable so I can send you a patch.

Thank you.

----------------------------------------------------------------------
(0003431) paul (administrator) - 05-Apr-12 16:07
http://www.dbmail.org/mantis/view.php?id=926#c3431
----------------------------------------------------------------------
I don't have any problem with that. Just make sure the CAPABILITY is
updated accordingly.

----------------------------------------------------------------------
(0003434) vampyre (reporter) - 09-Apr-12 11:48
http://www.dbmail.org/mantis/view.php?id=926#c3434
----------------------------------------------------------------------
Hello Paul,

I have enclosed the patch for configuring the ACL behavior. I've also put
the IMAP related attributes in one structure.

Could you please take a look and inform me if something should be
corrected.

Thank you.

----------------------------------------------------------------------
(0003437) paul (administrator) - 09-Apr-12 13:17
http://www.dbmail.org/mantis/view.php?id=926#c3437
----------------------------------------------------------------------
Stanislav,

You're almost there.

First off: new variables and declarations should take note of
http://www.dbmail.org/mantis/view.php?id=967.

_imap_params: please avoid variables starting with '_'
imap_param_t: avoid _t postfixes on declarations

I will clean up the existing stuff, but new things should abide also.


Finally, I see a lot of these:

+ if (_imap_params.check_acl && mailbox_check_acl(self,
self->mailbox->mbstate, ACL_RIGHT_READ) == 1) {

I think the check should be moved into mailbox_check_acl.

----------------------------------------------------------------------
(0003438) vampyre (reporter) - 09-Apr-12 16:13
http://www.dbmail.org/mantis/view.php?id=926#c3438
----------------------------------------------------------------------
Hello,

Ok, I was not aware of new code conventions, the required improvements
have been done.

Could you please recheck.

Issue History
Date Modified Username Field Change
======================================================================
20-Sep-11 13:12 vampyre New Issue
05-Apr-12 15:20 vampyre Note Added: 0003430
05-Apr-12 16:07 paul Note Added: 0003431
09-Apr-12 11:45 vampyre File Added: 0000926.patch
09-Apr-12 11:48 vampyre Note Added: 0003434
09-Apr-12 13:17 paul Note Added: 0003437
09-Apr-12 16:11 vampyre File Added: 0000926_new.patch

09-Apr-12 16:13 vampyre Note Added: 0003438
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

DBMail dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.