You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2015/10/12 20:17:05 UTC

[jira] [Commented] (OFBIZ-6210) Replace EntityUtilProperties with EntityClassLoader

    [ https://issues.apache.org/jira/browse/OFBIZ-6210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14953508#comment-14953508 ] 

Jacques Le Roux commented on OFBIZ-6210:
----------------------------------------

At Adrian's request continue discussion here instead than in OFBIZ-6205 which is now closed
{quote}
Jacopo Cappellato added a comment - 25/Mar/15 08:27
That is an interesting solution: however I am concerned that overloading the class loaders with all the lookups for entity/system resources could have an impact on performance and system's load.
I am not saying it is a bad idea, however I would feel more comfortable if these issues are fixed with the existing approach and then converted all at once into EntityClassLoader calls when we are sure we know the impact on performance (with profiling and performance tests).

Adrian Crum added a comment - 25/Mar/15 11:00
There is no performance impact using EntityClassLoader. Others are welcome to run performance tests if they wish, but a simple review of the code will make it clear that the difference boils down to reading a file from the local file system versus reading a file from the database (that same difference exists now with the EntityUtilProperties implementation).


Jacopo Cappellato added a comment - 25/Mar/15 11:14
But the way class loaders work is that when you search for an (entity) resource, the class loader will first call the parent class loader (and up at the root of the tree) before using the EntityClassLoader's methods.

Jacques Le Roux added a comment - 25/Mar/15 11:48 - edited
Does this not relies on the file system? Then the OS (Linux at least) should cache, no?
I mean to find the class file.

Adrian Crum added a comment - 25/Mar/15 12:03
Can we continue this discussion in OFBIZ-6210 please?

Jacques Le Roux added a comment - 25/Mar/15 12:25
Right , We can't resist to a reply button ;)
{quote}

> Replace EntityUtilProperties with EntityClassLoader
> ---------------------------------------------------
>
>                 Key: OFBIZ-6210
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6210
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Upcoming Branch
>            Reporter: Adrian Crum
>            Priority: Minor
>
> The EntityUtilProperties implementation is very limited and requires rewriting a lot of code. Using EntityClassLoader will achieve the same result without changing any code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)