httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: idea - last-modified despite SSI - possible performance booster
Date Sun, 02 Feb 1997 18:19:57 GMT
If you wanted this tool to be able to automatically know what files need
re-parsing then you should include a date stamp in the #ssi command of
when the last parse was (to be compared against the mtime).  Or you could
just take the same approach as a compiler... have source files and object
files.  I was thinking of doing this and generating output like this: 

( length, is_a_command, data ) 

i.e. a binary structure with three fields in each record.  This makes
parsing in mod_include pretty simple :) 

Dean

On Sun, 2 Feb 1997, Rob Hartill wrote:

> 
> Another idea to speed up SSI could be to add support for a tag such as:
> 
> <!--#ssi-off -->
> 
> to tell mod_include that the rest of the text should not be parsed for
> SSI. I could make use of that so a patch is attached. Comments ?
> 
> -=-=
> 
> Also, search times could be eliminated with something like:
> 
> <!--#ssi offsets="123 456 789" -->
> 
> to tell mod_include where to seek to in order to find all the include
> statements. One could write an offline parser to compute the offsets
> and embed the info at the beginning of files. Seek is a wonderful
> replacement for brute force searching.
> 
> A simpler version might be
> 
> <!--#ssi lines="10 20 30" -->   if CR/LF issues are addressed.
> 
> 
> Not for 1.2  :-)   but someone might want to think about somthing to go
> into the patches directory.
> 
> 
> rob
> 
> 
> 
> Index: mod_include.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/mod_include.c,v
> retrieving revision 1.4
> diff -u -r1.4 mod_include.c
> --- mod_include.c       1997/01/20 14:50:17     1.4
> +++ mod_include.c       1997/02/02 14:25:45
> @@ -1574,7 +1574,11 @@
>          if(!find_string(f,STARTING_SEQUENCE,r,printing)) {
>              if(get_directive(f,directive,r->pool))
>                  return;
> -            if(!strcmp(directive,"if")) {
> +            if(!strcmp(directive,"ssi-off")) {
> +                find_string(f,ENDING_SEQUENCE,r,0);
> +                send_fd(f,r);
> +                return;
> +            } else if(!strcmp(directive,"if")) {
>                  if (!printing) {
>                      if_nesting++;
>                  } else {
> 
> 


Mime
View raw message