skip processing html and page From a module, I want to output "hello world" simply as a string as efficiently as possible when i call /mymodule/helloworld.

ofcourse, using hook_preprocess_html and hook_preprocess_page i can assign nearly empty templates. the html template should contain &lt;?php print $page; ?&gt; and the page template &lt;?php print render($page['content']); ?&gt;, and the content could be the string 'hello world'.

however, drupal will still go through all the processes of generating $css in html or $page['sidebar_first'] in the page. Even if I override template_process_html it seems $variables['page']['page_top'] has already been populated. 

How can I skip all the content processing and go straight for the output ?

[EDIT] had some usefull comments here, but still not what I want. I forgot to mention, I do want to use a template to print 'hello world'. So as I can override it in a theme, for example.


Yes, I can change the delivery callback (either in hook_menu or in
hook_page_delivery_callback_alter), but what the callback method
receives is a render array. I do want to use a node template to render
the content as html. I'd have to write my own delivery callback, I guess
Yes, I can print out the html and call drupal_exit(), but then I wouldnt have
the luxury of using a node template either


So, still looking.

*-pike
based on comments above and my own edits, i came up with this

function my_page_callback() {
    $output =  array(
        'template' =&gt; array(
            'data'      =&gt; array('dummy'=&gt;true),
            '#theme'    =&gt; 'my_theme'
        )
    );
    print drupal_render($output);
    drupal_exit();
}


that goes straight for the beef: print the output. it does however use the templating system to create that output. it does not, i think, do all the preprocessing that would otherwise happen.