openscholar/openscholar — pull request #6453 by RoySegall (2014-07-29 12:33:45+00:00)
Title: Creating show description field manually.

#6434

@rbran100 I found the problem and what caused for the heavy work. The `field_create_instance` method have `module_invoke_all('field_create_instance', $instance);` in the end. I checked and there something like 5-10 modules that implement this hook. Most of them doing some logic, logic that is not needed when we just attaching the field.

In this PR i took most of the work without the invoking of the hook and used her. I added a cache clear for the field and i also did not use the wrapper. If we want to use the wrapper we need to clear the cache if the entity module and this is a heavy work. I removed it.

I checked in the profiler and the result are good:
![selection_014](https://cloud.githubusercontent.com/assets/1222368/3734797/61258594-171c-11e4-97bf-057a99cdb518.png)
105, 858 microseconds which are 0.105858 second.