Re: [development] reducing module size

2011-02-02 Thread Larry Garfield
It depends greatly on your server configuration. Splitting out page callback files in D6 was actually the biggest performance boost of that version, but made no difference either way on APC: http://www.garfieldtech.com/blog/benchmark-page-split --Larry Garfield On Wednesday, February 02, 2011

Re: [development] How can I refer to the shopping cart using document.getElementById if it does not have an id?

2011-02-02 Thread John Mitchell
Regarding the below email: No I don't have any JS errors in my firebug console. I am not aggregating my JS or CSS. Yes my CSS files aren't loading. Keep in mind that I have an iframe within my drupal page which is not drupal and is on another domain. The user clicks an "Add to Cart" link within

[development] index/search user fields in D7

2011-02-02 Thread Serhat Sevki Dincer
Greetings, I have added some fields to my users, field_interests and field_bio. I want to be able to index/search users using data in these two fields. Included search module in D7 allows to index/search only on usernames and email addresses for users. I'm not looking for a fancy solution like Sol

Re: [development] reducing module size

2011-02-02 Thread Gordon Heydon
Hi, Ultimately I don't think that splitting out code is going to give you are huge benefit. However I find that splitting out the code multiple source files makes it a lot easier to maintain than 1 big file. easier to group functions. I never really like dealing with source files which are 1000

Re: [development] Drupal Answers: A Stackoverflow/StackExchange site proposal

2011-02-02 Thread Mark Ferree
I don't see a Drupal Stack Exchange site replacing anything on drupal.org. I use SO quite a bit to find answers to general questions as well as researching other languages not as well documented as PHP. I have occasionally answered a Drupal question on there and for the most part my answers have be

Re: [development] reducing module size

2011-02-02 Thread Bob Hutchinson
On Wednesday 02 February 2011, Bob Hutchinson wrote: > I have a module whose functions are only used by logged-in users, it > provides nothing to 'Anonymous' users except for a block. > I'm considering loading most of the functions only when $user->uid > 0 > probably in hook_init() > > My question

Re: [development] Drupal Answers: A Stackoverflow/StackExchange site proposal

2011-02-02 Thread Adam B. Ross
I really love StackOverflow. I think the model absolutely has a place in the greater D.O universe. There are too many long-term disadvantages to outsourcing our support system. Anything Drupal on SO is sure to get good traffic, but so does any other niche-popular thing on the Internet. One of the

Re: [development] reducing module size

2011-02-02 Thread Randy Fay
greggles has pointed out to me that if you know what your target site is, and that site has a decent PHP cache, then any optimization about when to load code is wasted effort, because you should probably have all your code in memory all the time. -Randy On Wed, Feb 2, 2011 at 9:53 AM, Carl Wiedem

Re: [development] reducing module size

2011-02-02 Thread Carl Wiedemann
Before you go out and rewrite all your code, consider what your goals are with this. The decision, ultimately, should be driven by data, rather than perception. Also consider: Do you have performance benchmarks? Are you running an op-code cache? Is simply buying more RAM for the server less expensi

Re: [development] reducing module size

2011-02-02 Thread nan wich
You can split the module into several modules (which will, of course, have to be enabled). In your example, the block code could be in a separate module (see http://drupal.org/project/weblinks). However, any opcode caching that you use is going to keep more execution-ready code in memory than

Re: [development] reducing module size

2011-02-02 Thread Pierre Rineau
Le mercredi 02 février 2011 à 13:54 +0100, jcisio a écrit : > It depends on which Drupal you are using, D6 or D7. Read the > documentation about D7, where you can split your .module into multiple > files. > > In D6, in general, all hook implementations must be presented in your > .module file. How

Re: [development] reducing module size

2011-02-02 Thread Dave Metzler
In D6I tend to use the include mechanism provided in hook menu, but there is nothing wrong with including files as you need them... (e.g. At the beginning ofbthe hook block call. Loading them in init means they get loaded whether you use them or not. Sent from my iPad On Feb 2, 2011, at 4:46

Re: [development] reducing module size

2011-02-02 Thread Gordon Heydon
Hi, to make a module load, the module can be an empty file but will not do much. For drupal 6.x you need to load in your hook functions into the .module file, but with things like hook_menu() you can specify which file to load when executing this menu item, which will allow you to move more out

Re: [development] reducing module size

2011-02-02 Thread jcisio
It depends on which Drupal you are using, D6 or D7. Read the documentation about D7, where you can split your .module into multiple files. In D6, in general, all hook implementations must be presented in your .module file. However, except your module is too big, this micro optimization has only ne

[development] reducing module size

2011-02-02 Thread Bob Hutchinson
I have a module whose functions are only used by logged-in users, it provides nothing to 'Anonymous' users except for a block. I'm considering loading most of the functions only when $user->uid > 0 probably in hook_init() My question is, which functions would have to be loaded in order for thing