WURFL Memory footprint

accorhotels
Posts: 2
Joined: Tue Jun 24, 2014 4:14 am

WURFL Memory footprint

Postby accorhotels » Wed Jul 09, 2014 8:33 am

Hello,

I'm using wurfl 1.5.1 Java API and have questions about the memory usage of the WURFL database.

I produced a HeapDump and found with Eclipse MAT that the memory consumption was 20.3MB (see image attached)

Is there a way to reduce the size of the model in memory ?

I'm using Spring for the configuration and limit the capabilities to this set :

Code: Select all

<bean id="detectionEngine" class="net.sourceforge.wurfl.core.GeneralWURFLEngine">
        <property name="cacheProvider" ref="deviceCacheProvider" />
        <constructor-arg index="0" value="classpath:/wurfl.zip" />
        <property name="capabilityFilter">
            <set>
                <value>device_os</value>
                <value>device_os_version</value>
                <value>brand_name</value>
                <value>model_name</value>
                <value>marketing_name</value>
                <value>is_tablet</value>
                <value>is_wireless_device</value>
                <value>resolution_height</value>
                <value>resolution_width</value>
                <value>pointing_method</value>
                <value>mobile_browser_version</value>
                <value>mobile_browser</value>
                <value>ux_full_desktop</value>
                <value>preferred_markup</value>
                <value>xhtml_support_level</value>
            </set>
        </property>
    </bean>
Image

Thanks in advance

Elliotfehr

Re: WURFL Memory footprint

Postby Elliotfehr » Wed Jul 09, 2014 2:00 pm

Hello,

Unfortunately, it is not possible to reduce the memory usage by a significant amount as it is necessary for the wurfl.xml file to be loaded into memory for performance reasons.

Thank you,

Elliot

Elliotfehr

Re: WURFL Memory footprint

Postby Elliotfehr » Wed Jul 09, 2014 3:36 pm

Hello,

I am currently working with my Java team to see if we can reduce the memory usage and will let you know when we have an update.

Thank you,

Elliot

accorhotels
Posts: 2
Joined: Tue Jun 24, 2014 4:14 am

Re: WURFL Memory footprint

Postby accorhotels » Thu Jul 10, 2014 7:11 am

Ok, thank you for the quick answer.

Elliotfehr

Re: WURFL Memory footprint

Postby Elliotfehr » Thu Jul 10, 2014 11:44 am

To clarify,

When the Java API starts, it will load the wurfl.xml as well as a few other resources needed by the application into the memory in order maximize performance, which explains the memory consumption that you mentioned. It is possible to reduce this overhead with a capability filter (as you have done) in order to reduce the amount loaded into memory.

We do try to keep this memory consumption as low as it is in order to reduce the overhead to maximize the number of environments that WURFL can operate in.

Thank you,

Elliot


Who is online

Users browsing this forum: No registered users and 13 guests