[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Slick Forums :: View topic - Quick artemis-odb question. deleting entity w/ pooled comp
Slick Forums
http://slick.ninjacave.com/forum/

Quick artemis-odb question. deleting entity w/ pooled comp
http://slick.ninjacave.com/forum/viewtopic.php?f=28&t=6978
Page 1 of 1

Author:  TriangleMan [ Tue Dec 24, 2013 10:43 pm ]
Post subject:  Quick artemis-odb question. deleting entity w/ pooled comp

When an entity with pooled components is deleted, are those pooled components recycled as well? I guess I'm missing how the component manager sees which entities are deleted after a call to world.deleteEntity(...). I'm kind of new to Java so I'm sure I'm missing something important. Kind of a silly question maybe but I really want to know

Thanks!

Author:  junkdog [ Thu Dec 26, 2013 9:51 am ]
Post subject:  Re: Quick artemis-odb question. deleting entity w/ pooled co

Yes, pooled components are always reused. Deleting an entity invokes the deleted(Entity) method on all EntitySystems and Managers. The ComponentManager reclaims/removes all affected components during .

More behind the scenes: upon encountering a component type for the first time, a for said component is created which - among some other things - checks whether the component extends Component, PooledComponent or PackedComponent.

When a component is removed or an entity deleted, the ComponentType associated with the component is queried about its taxonomy (basic, pooled, packed). Pooled components are returned/obtained from the (or, if the pool hasn't recycled any components, a new instance is returned).

Since you're somewhat new to java:
- I'm assuming you haven't set up your project as a maven project, but if you have: the @PooledComponent annotation can automatically transform components into PooledComponent via the artemis-odb-maven-plugin.
- There's a slight performance hit from using PooledComponents - unless you're creating a ton of components (>1000/s), you're probably better off using normal components. On android/dalvik however, GC pauses can cause a lot of micro stutter - which can be alleviated to some extent by using pooled components.

Author:  TriangleMan [ Sat Dec 28, 2013 10:23 pm ]
Post subject:  Re: Quick artemis-odb question. deleting entity w/ pooled co

Upon closer inspection I know see what I was missing... Thanks for answering!

Author:  Steelsmasher [ Fri Aug 01, 2014 2:07 am ]
Post subject:  Re: Quick artemis-odb question. deleting entity w/ pooled co

Does artemis pool entities? And would it be worth using the libgdx pooling interface for entities?

Author:  junkdog [ Fri Aug 01, 2014 2:16 am ]
Post subject:  Re: Quick artemis-odb question. deleting entity w/ pooled co

It already pools all entity instances and any component types that extend com.artemis.PooledComponent or are annotated with @PooledWeaver (@*Weaver annotations require the CLI tool or maven plugin).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/