You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2006/09/09 10:25:22 UTC

[jira] Created: (DIRSERVER-732) FilterParser initialized for each search

FilterParser initialized for each search
----------------------------------------

                 Key: DIRSERVER-732
                 URL: http://issues.apache.org/jira/browse/DIRSERVER-732
             Project: Directory ApacheDS
          Issue Type: Improvement
            Reporter: Emmanuel Lecharny
            Priority: Minor
             Fix For: 1.1.0


The FilterParserImpl is initialized ecery time we do a search, when it should only be initialized once, and be synchronized if we use it. The cost of this initialization, even if not important, represent around 1% of all the CPU.

Another point I would raise is : do we need to parse filters on the server ? At first glance, it seems that its usage is only necessary when dealing with persistent searches, but even then, the received request is supposed to contains a preparsed form of the filter, which is stored in a Filter structure. I may be wrong, as I didn't have look at the code very thouroughly, but it seems strange to me ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DIRSERVER-732) FilterParser initialized for each search

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-732:
----------------------------------------


The "offending" code is in org.apache.directory.server.core.jndi.ServerDirContext. There is a member which is initializing the filter each time we create a new ServerDirContext :
    FilterParserImpl filterParser = new FilterParserImpl();
(line 730)

> FilterParser initialized for each search
> ----------------------------------------
>
>                 Key: DIRSERVER-732
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-732
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>            Reporter: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.1
>
>
> The FilterParserImpl is initialized ecery time we do a search, when it should only be initialized once, and be synchronized if we use it. The cost of this initialization, even if not important, represent around 1% of all the CPU.
> Another point I would raise is : do we need to parse filters on the server ? At first glance, it seems that its usage is only necessary when dealing with persistent searches, but even then, the received request is supposed to contains a preparsed form of the filter, which is stored in a Filter structure. I may be wrong, as I didn't have look at the code very thouroughly, but it seems strange to me ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRSERVER-732) FilterParser initialized for each search

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRSERVER-732.
-----------------------------------------

    Resolution: Fixed

Fixed :

http://svn.apache.org/viewvc?view=rev&rev=520645

> FilterParser initialized for each search
> ----------------------------------------
>
>                 Key: DIRSERVER-732
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-732
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>            Reporter: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.1
>
>
> The FilterParserImpl is initialized ecery time we do a search, when it should only be initialized once, and be synchronized if we use it. The cost of this initialization, even if not important, represent around 1% of all the CPU.
> Another point I would raise is : do we need to parse filters on the server ? At first glance, it seems that its usage is only necessary when dealing with persistent searches, but even then, the received request is supposed to contains a preparsed form of the filter, which is stored in a Filter structure. I may be wrong, as I didn't have look at the code very thouroughly, but it seems strange to me ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-732) FilterParser initialized for each search

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Karasulu updated DIRSERVER-732:
------------------------------------


Can you reference the code which is doing this?

> FilterParser initialized for each search
> ----------------------------------------
>
>                 Key: DIRSERVER-732
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-732
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>            Reporter: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> The FilterParserImpl is initialized ecery time we do a search, when it should only be initialized once, and be synchronized if we use it. The cost of this initialization, even if not important, represent around 1% of all the CPU.
> Another point I would raise is : do we need to parse filters on the server ? At first glance, it seems that its usage is only necessary when dealing with persistent searches, but even then, the received request is supposed to contains a preparsed form of the filter, which is stored in a Filter structure. I may be wrong, as I didn't have look at the code very thouroughly, but it seems strange to me ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRSERVER-732) FilterParser initialized for each search

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-732.
---------------------------------------


Has been fixed in 1.5.0.

> FilterParser initialized for each search
> ----------------------------------------
>
>                 Key: DIRSERVER-732
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-732
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>            Reporter: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.1
>
>
> The FilterParserImpl is initialized ecery time we do a search, when it should only be initialized once, and be synchronized if we use it. The cost of this initialization, even if not important, represent around 1% of all the CPU.
> Another point I would raise is : do we need to parse filters on the server ? At first glance, it seems that its usage is only necessary when dealing with persistent searches, but even then, the received request is supposed to contains a preparsed form of the filter, which is stored in a Filter structure. I may be wrong, as I didn't have look at the code very thouroughly, but it seems strange to me ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-732) FilterParser initialized for each search

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-732:
----------------------------------------

    Fix Version/s:     (was: 1.5.0)
                   1.5.1

Postponed to 1.5.1

> FilterParser initialized for each search
> ----------------------------------------
>
>                 Key: DIRSERVER-732
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-732
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>            Reporter: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.1
>
>
> The FilterParserImpl is initialized ecery time we do a search, when it should only be initialized once, and be synchronized if we use it. The cost of this initialization, even if not important, represent around 1% of all the CPU.
> Another point I would raise is : do we need to parse filters on the server ? At first glance, it seems that its usage is only necessary when dealing with persistent searches, but even then, the received request is supposed to contains a preparsed form of the filter, which is stored in a Filter structure. I may be wrong, as I didn't have look at the code very thouroughly, but it seems strange to me ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-732) FilterParser initialized for each search

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482566 ] 

Emmanuel Lecharny commented on DIRSERVER-732:
---------------------------------------------

Just a heads up : what about decalring this filterParser as a static final member ? It should do the trick. 

> FilterParser initialized for each search
> ----------------------------------------
>
>                 Key: DIRSERVER-732
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-732
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>            Reporter: Emmanuel Lecharny
>            Priority: Minor
>             Fix For: 1.5.1
>
>
> The FilterParserImpl is initialized ecery time we do a search, when it should only be initialized once, and be synchronized if we use it. The cost of this initialization, even if not important, represent around 1% of all the CPU.
> Another point I would raise is : do we need to parse filters on the server ? At first glance, it seems that its usage is only necessary when dealing with persistent searches, but even then, the received request is supposed to contains a preparsed form of the filter, which is stored in a Filter structure. I may be wrong, as I didn't have look at the code very thouroughly, but it seems strange to me ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.