heu... tu as fait un comparatif perfo ?
avec S on perd aussi souvent qu'on gagne, donc faut pas faire ca systematiquement
real3t@gmail.com a écrit :
Author: real3t@gmail.com
Date: Wed Aug 30 19:36:57 2006
New Revision: 4977Log:
Rajout des modificateur /S pour accélérer le traitementModified:
_plugins_branche_stable_/_spip_1_9_0_/barre_typo_enrichie/typo_enrichie.phpModified: _plugins_branche_stable_/_spip_1_9_0_/barre_typo_enrichie/typo_enrichie.php
--- _plugins_branche_stable_/_spip_1_9_0_/barre_typo_enrichie/typo_enrichie.php (original)
+++ _plugins_branche_stable_/_spip_1_9_0_/barre_typo_enrichie/typo_enrichie.php Wed Aug 30 19:36:57 2006
@@ -61,23 +61,23 @@
global $debut_intertitre_5, $fin_intertitre_5;$chercher_raccourcis = array(
- /* 1 */ "/(^|[^{])[{][{][{]/",
- /* 2 */ "/[}][}][}]($|[^}])/",
- /* 3 */ "/(^|[^{])\{1\{/",
- /* 4 */ "/\}1\}($|[^}])/",
- /* 5 */ "/(^|[^{])\{2\{/",
- /* 6 */ "/\}2\}($|[^}])/",
- /* 7 */ "/(^|[^{])\{3\{/",
- /* 8 */ "/\}3\}($|[^}])/",
- /* 9 */ "/(^|[^{])\{4\{/",
- /* 10 */ "/\}4\}($|[^}])/",
- /* 9b */ "/(^|[^{])\{5\{/",
- /* 10b */ "/\}5\}($|[^}])/",
- /* 11 */ "/\{(§|§)\{/", # § Pour gérer l'unicode aussi !
- /* 12 */ "/\}(§|§)\}/",
- /* 13 */ "/<-->/",
- /* 14 */ "/-->/",
- /* 15 */ "/<--/"
+ /* 1 */ "/(^|[^{])[{][{][{]/S",
+ /* 2 */ "/[}][}][}]($|[^}])/S",
+ /* 3 */ "/(^|[^{])\{1\{/S",
+ /* 4 */ "/\}1\}($|[^}])/S",
+ /* 5 */ "/(^|[^{])\{2\{/S",
+ /* 6 */ "/\}2\}($|[^}])/S",
+ /* 7 */ "/(^|[^{])\{3\{/S",
+ /* 8 */ "/\}3\}($|[^}])/S",
+ /* 9 */ "/(^|[^{])\{4\{/S",
+ /* 10 */ "/\}4\}($|[^}])/S",
+ /* 9b */ "/(^|[^{])\{5\{/S",
+ /* 10b */ "/\}5\}($|[^}])/S",
+ /* 11 */ "/\{(§|§)\{/S", # § Pour gérer l'unicode aussi !
+ /* 12 */ "/\}(§|§)\}/S",
+ /* 13 */ "/<-->/S",
+ /* 14 */ "/-->/S",
+ /* 15 */ "/<--/S"
);$remplacer_raccourcis = array(
@@ -137,28 +137,13 @@
/* 15 */ ",\[/(.*)/\],Ums",
/* 17 */ ",\[\|(.*)\|\],Ums",
/* 19 */ ",\[\((.*)\)\],Ums",
- /* 21 */ "/\[\*\*/",
- /* 21b */ "/\[\*/",
- /* 22 */ "/\*\]/",
- /* 23 */ "/\[\^/",
- /* 24 */ "/\^\]/",
- /* 25 */ #"/<p class=\"spip\"><ul class=\"spip\">/",
- /* 26 */ #"/<\/ul>( *)<\/p>/",
- /* 27 */ #"/<p class=\"spip\"><ol class=\"spip\">/",
- /* 28 */ #"/<\/ol>( *)<\/p>/",
- /* 29 */ #"/<p class=\"spip\"><table class=\"spip\">/",
- /* 30 */ #"/<\/table>( *)<\/p>/",
- /* 31 */ #"/<p class=\"spip\">(\n| *)<div/",
- /* 32 */ #"/<\/div>( *)<\/p>/",
- /* 33 */ #"/<p class=\"spip\"><h([0-9])>/",
- /* 34 */ #"/<\/h([0-9])>( *)<\/p>/",
- /* 35 */ #"/<table cellpadding=5 cellspacing=0 border=0 align=''> <tr><td align='center'> <div class='spip_documents'>/",
- /* 36 */ #"/<\/div> <\/td><\/tr> <\/table>/",
- /* 37 */ #"/<p class=\"spip\"><div/",
- /* 38 */ #"/<p class=\"spip\"><blockquote class=\"spip\">/",
- /* 39 */ #"/<\/blockquote>( *)<\/p>/",
- /* 40 */ "/\[([^|][^]*)\|([^]*)\]/",
- /* 41 */ "/<a href=([^>]*)>([^|<]*)\|([^<]*)<\/a>/"
+ /* 21 */ "/\[\*\*/S",
+ /* 21b */ "/\[\*/S",
+ /* 22 */ "/\*\]/S",
+ /* 23 */ "/\[\^/S",
+ /* 24 */ "/\^\]/S",
+ /* 40 */ "/\[([^|][^]*)\|([^]*)\]/S",
+ /* 41 */ "/<a href=([^>]*)>([^|<]*)\|([^<]*)<\/a>/S");
$remplace1 = array(_______________________________________________
Spip-zone-commit@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone-commit