<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Adding additional modules also adds some overhead though. You got the
PHP parsing having to run through that file (helped some with op-code
caching), as well as another hook_block to call and process in this
case. So I would say the performance difference between the two
scenarios would be hardly noticeable. In this case, where views is
already used, sticking with views would give the added benefit of less
code to maintain also. <br>
<br>
Basically if they weren't already using views, I would suggest going
the custom module route; Views would be overkill for such a simple
purpose. Since they are already using views though, go ahead and
utilize it and make life a little simpler.<br>
<pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://www.intoxination.net">http://www.intoxination.net</a> 
<a class="moz-txt-link-freetext" href="http://www.hollyit.net">http://www.hollyit.net</a></pre>
<br>
On 5/26/2010 10:28 AM, Amit Vyas wrote:
<blockquote
 cite="mid:AANLkTim0yiImQuVanvE6RfbLmvwVK9-RY-vEPzFl24Vz@mail.gmail.com"
 type="cite">In a performance context, custom module block will be the
best solution as per my understanding. Because you are not storing your
block code in the database in that case. It is always good not to store
code in the database so if you are creating a view [which is easy to
implement but not recommended for performance point of view] then it
will store the code in the database.
  <div><br>
  <div class="gmail_quote">On Wed, May 26, 2010 at 7:45 PM, Michel
Morelli <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:michel@ziobuddalabs.it">michel@ziobuddalabs.it</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi
all, I have a big site on a not so good server machine.<br>
    <br>
Now I need to create (and display) a block with the last entry of a<br>
particular node type (call it "foo").<br>
    <br>
I can do this in 2 ways:<br>
- views (with template files)<br>
- custom module with costum block section<br>
    <br>
In a performance context which is the best solution ?<br>
I use views in the site so this will not be the only view, and I use<br>
other custom modules so the block section will be part of one of them.<br>
    <br>
Tnx.<br>
    <br>
M.<br>
    <br>
--<br>
Michel 'ZioBudda' Morelli &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a
 moz-do-not-send="true" href="mailto:michel@ziobuddalabs.it">michel@ziobuddalabs.it</a><br>
Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax)<br>
Telefono: 0200619074<br>
Telefono Cell: +39-3939890025 -- &nbsp;Fax: +39-0291390660<br>
    <br>
    <a moz-do-not-send="true" href="http://www.ziobudda.net"
 target="_blank">http://www.ziobudda.net</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
ICQ: 58351764<br>
    <a moz-do-not-send="true" href="http://www.ziobuddalabs.it"
 target="_blank">http://www.ziobuddalabs.it</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;Skype: zio_budda<br>
    <a moz-do-not-send="true" href="http://www.ziodrupal.net"
 target="_blank">http://www.ziodrupal.net</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;MSN: <a moz-do-not-send="true" href="mailto:michel@ziobuddalabs.it">michel@ziobuddalabs.it</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JABBER: <a
 moz-do-not-send="true" href="mailto:michel@ziobuddalabs.it">michel@ziobuddalabs.it</a><br>
    <font color="#888888"><br>
--<br>
[ Drupal support list | <a moz-do-not-send="true"
 href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a>
]<br>
    </font></blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Regards,<br>
Amit Vyas<br>
  <br>
Email &nbsp;: <a moz-do-not-send="true"
 href="mailto:amit.vyas@blisstering.com">amit.vyas@blisstering.com</a><br>
Mobile : +91 993-040-1490<br>
Skype : vyasamit2004<br>
Twitter : amit_vyas<br>
  </div>
</blockquote>
</body>
</html>