<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><SPAN class=335575203-26022008><FONT face=新細明體
color=#0000ff size=2>mmm ... it is not quite easy to read the "Parsed Array"
from XML_parser, we need an container like "array_tree" to solve this kind of
data structure.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=335575203-26022008><FONT face=新細明體
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=335575203-26022008><FONT face=新細明體
color=#0000ff size=2>So, I decide to reduce the caculation first. After I finish
all 2.0 stuff, then I can have time to deal with this.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=335575203-26022008><FONT face=新細明體
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=335575203-26022008><FONT face=新細明體
color=#0000ff size=2>You can take a look at this menu array parsed from XML, it
is quite "big". I think it not only consumed our time also consumed our
memory.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=335575203-26022008></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=335575203-26022008><FONT face=新細明體
color=#0000ff size=2>Mark</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=zh-tw dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> plog-svn-bounces@devel.lifetype.net
[mailto:plog-svn-bounces@devel.lifetype.net] <B>On Behalf Of </B>Oscar
Renalias<BR><B>Sent:</B> Tuesday, February 26, 2008 4:35 AM<BR><B>To:</B>
LifeType Developer List<BR><B>Subject:</B> Re: [pLog-svn] Add the cache
control to menu<BR></FONT><BR></DIV>
<DIV></DIV>That's still not bad, but what were the problems that you faced
when turning the structure from an XML_Tree object into a plain array?
<DIV><BR>
<DIV>
<DIV>On Feb 25, 2008, at 6:16 AM, Mark Wu wrote:</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><SPAN class=069471404-25022008><FONT
face="f0g40fi+" color=#0000ff size=2>Hi
Oscar:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=069471404-25022008><FONT
face="f0g40fi+" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=069471404-25022008><FONT
face="f0g40fi+" color=#0000ff size=2>In my test, it
reduce the total request time from 534 ms to 440 ms. It saved almost 100ms
in my installation.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=069471404-25022008><FONT
face="f0g40fi+" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=069471404-25022008><FONT
face="f0g40fi+" color=#0000ff size=2>So, I think it
worth to try ... :)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=069471404-25022008><FONT
face="f0g40fi+" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=069471404-25022008><FONT
face="f0g40fi+" color=#0000ff
size=2>Mark</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=zh-tw dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> plog-svn-bounces@devel.lifetype.net
[<A
href="mailto:plog-svn-bounces@devel.lifetype.net">mailto:plog-svn-bounces@devel.lifetype.net</A>]
<B>On Behalf Of </B>Oscar Renalias<BR><B>Sent:</B> Thursday, February 21,
2008 4:58 AM<BR><B>To:</B> LifeType Developer List<BR><B>Subject:</B> Re:
[pLog-svn] Add the cache control to menu<BR></FONT><BR></DIV>
<DIV></DIV>How about some benchmarks? Would you have some time to look
into generating some benchmarks? Numbers don't lie :)
<DIV><BR>
<DIV>
<DIV>On Feb 19, 2008, at 6:59 AM, Mark Wu wrote:</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008>Hi All:</SPAN></FONT></DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008></SPAN></FONT> </DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008>After review the code, it is not easy to
replace the current XML menu with array tree. </SPAN></FONT></DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008></SPAN></FONT> </DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008>So, I try to add the cache to XML menu
first.</SPAN></FONT></DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008></SPAN></FONT><FONT
face="f0g40fi+" size=2><SPAN
class=278425104-19022008></SPAN></FONT> </DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008>1. The menu cache will cache our core xml menus
plus plugins' menus. After lifetype cache it, the menu will load from
cache directly until the cache expired or deleted.</SPAN></FONT></DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008></SPAN></FONT> </DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008>2. If the method works, I will add remove cache
in plugins centers. Therefore, the cache will removed when we
add/remove/refresh the plugins center.</SPAN></FONT></DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008></SPAN></FONT> </DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008>If any one of you have time, please kindly test
this cached version script, and let me know if it help performance or
not.</SPAN></FONT></DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008></SPAN></FONT> </DIV>
<DIV><FONT face="f0g40fi+" size=2><SPAN
class=278425104-19022008>Regards,
Mark</SPAN></FONT></DIV></DIV><SPAN><menu.class.php></SPAN>_______________________________________________<BR>pLog-svn
mailing list<BR><A
href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</A><BR><A
href="http://limedaley.com/mailman/listinfo/plog-svn">http://limedaley.com/mailman/listinfo/plog-svn</A></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></DIV>_______________________________________________<BR>pLog-svn
mailing list<BR><A
href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</A><BR>http://limedaley.com/mailman/listinfo/plog-svn</BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>