Closed (duplicate)
Project:
Viewfield
Version:
7.x-2.0
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2012 at 08:00 UTC
Updated:
10 Feb 2017 at 05:17 UTC
Jump to comment: Most recent
Comments
Comment #1
natureofdorset commentedComment #2
natureofdorset commentedJust wondering what the point of this reporting system is if no one answers?
Comment #3
robmalon commentedI was thinking about using this module and this case stood out since it points out a concern I had. I'm currently in between two options. Use this module, or create a dummy field in my content type and use hook_views_pre_render (http://api.drupal.org/api/views/views.api.php/function/hook_views_pre_re...) on the related view to do what I want. The latter would seem more efficient for me since I condense about 5 separate views queries for my use case into a single simpler one. Just feels not kosher. I bring this up because it might be an option for you @natureofdorset. It's the route I'll probably be going.
Anyways, in the past it seems as though views is somewhat a memory hog to begin with. It would be interesting to know if this module adds that much more weight to it or if it's just a symptom of using it more often via the field on additional pages.
Comment #4
fraweg commentedHello,
how do you test your memory usage?
Best regards
Frank
Comment #5
simonyeldon commentedWe have been having the same issue, and after a bit of playing around it seems to be that there is an issue with the token helper rendering.
We got around the problem by using a hook_form_FORM_ID_alter to unset the token helper so that it was not rendered.
Here is an example of the code we used.
Comment #6
steinmb commentedCross posting #2073555: Node/add/page with viewfield loaded very slow ...
Comment #7
fraweg commentedHello simonyeldon,
So you do this:
for every viewfield?
Do you feel that the performance is better?
Best regards
Frank
Comment #8
peterx commented@robmalon, joins can be memory hogs and Views sometimes uses joins in cases where you could hand code something more efficient.
Token helper is mentioned a problem in several issues.
To everyone with views hogging resources under Viewfield, edit the view and add a page display. Test the view in the page display. Is it a resource hog when run by itself?
Switch on the SQL display in views and look at the SQL. Are there joins? Are the filters selecting the minimum data?
If the view is not a resource hog when run by itself and it is not producing a join, you could export the view and add the export here so we can look at the view code.
Comment #9
ilia.ivanov commented@simonyeldon thank you very much! #5 solution works for me.
Comment #10
damienmckennaMaybe try applying the patch from #1784880: Implement token dialog to make the token browser use the popup dialog instead of displaying inline?
Comment #11
steinmb commentedComment #12
ngocketit commentedWhy don't we have an option to not show the Token helper? The page is exceptionally slow for Ajax requests of image fields.
Comment #13
ngocketit commentedProbably it's better to use hook_field_widget_form_alter() instead of hook_form_alter() since the field may be used in a Field collection item for example.
Comment #14
hargobindWith the commit of #1784880: Implement token dialog and release of 7.x-2.1 a couple weeks ago, this issue is likely resolved. If not, feel free to reopen the issue.