mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Bug 352236 remove timer code from mozTXTToHTMLConv.cpp
r=darin
This commit is contained in:
parent
9827ee91b9
commit
c4ede84550
@ -62,7 +62,6 @@ REQUIRES = xpcom \
|
||||
nkcache \
|
||||
pref \
|
||||
mimetype \
|
||||
util \
|
||||
locale \
|
||||
intl \
|
||||
uconv \
|
||||
@ -116,10 +115,6 @@ SHARED_LIBRARY_LIBS += \
|
||||
LOCAL_INCLUDES += -I$(srcdir)/../cookie/src
|
||||
endif
|
||||
|
||||
ifdef MOZ_PERF_METRICS
|
||||
EXTRA_DSO_LIBS += mozutil_s
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(LIBS_DIR) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
|
@ -52,7 +52,6 @@ REQUIRES = xpcom \
|
||||
locale \
|
||||
intl \
|
||||
unicharutil \
|
||||
util \
|
||||
pref \
|
||||
uconv \
|
||||
$(ZLIB_REQUIRES) \
|
||||
|
@ -768,8 +768,6 @@ PRBool
|
||||
mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBool col0,
|
||||
nsString& aOutputString, PRInt32& glyphTextLen)
|
||||
{
|
||||
MOZ_TIMER_START(mGlyphHitTimer);
|
||||
|
||||
PRUnichar text0 = aInString[0];
|
||||
PRUnichar text1 = aInString[1];
|
||||
PRUnichar firstChar = (col0 ? text0 : text1);
|
||||
@ -911,7 +909,6 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo
|
||||
)
|
||||
{
|
||||
aOutputString.Append(outputHTML);
|
||||
MOZ_TIMER_STOP(mGlyphHitTimer);
|
||||
return PR_TRUE;
|
||||
}
|
||||
i++;
|
||||
@ -920,7 +917,6 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo
|
||||
{
|
||||
aOutputString.AppendLiteral("<span class='moz-txt-formfeed'></span>");
|
||||
glyphTextLen = 1;
|
||||
MOZ_TIMER_STOP(mGlyphHitTimer);
|
||||
return PR_TRUE;
|
||||
}
|
||||
if (text0 == '+' || text1 == '+')
|
||||
@ -931,7 +927,6 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo
|
||||
{
|
||||
aOutputString.AppendLiteral(" ±");
|
||||
glyphTextLen = 4;
|
||||
MOZ_TIMER_STOP(mGlyphHitTimer);
|
||||
return PR_TRUE;
|
||||
}
|
||||
if (col0 && ItMatchesDelimited(aInString, aInLength,
|
||||
@ -940,7 +935,6 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo
|
||||
{
|
||||
aOutputString.AppendLiteral("±");
|
||||
glyphTextLen = 3;
|
||||
MOZ_TIMER_STOP(mGlyphHitTimer);
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
@ -976,7 +970,6 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo
|
||||
|
||||
if (delimPos < aInLength && nsCRT::IsAsciiAlpha(aInString[delimPos]))
|
||||
{
|
||||
MOZ_TIMER_STOP(mGlyphHitTimer);
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
@ -989,7 +982,6 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo
|
||||
aOutputString.AppendLiteral("</sup>");
|
||||
|
||||
glyphTextLen = delimPos /* - 1 + 1 */ ;
|
||||
MOZ_TIMER_STOP(mGlyphHitTimer);
|
||||
return PR_TRUE;
|
||||
}
|
||||
/*
|
||||
@ -1005,7 +997,6 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo
|
||||
3/4 ¾ dito
|
||||
1/2 ½ similar
|
||||
*/
|
||||
MOZ_TIMER_STOP(mGlyphHitTimer);
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
@ -1015,23 +1006,10 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo
|
||||
|
||||
mozTXTToHTMLConv::mozTXTToHTMLConv()
|
||||
{
|
||||
MOZ_TIMER_RESET(mScanTXTTimer);
|
||||
MOZ_TIMER_RESET(mGlyphHitTimer);
|
||||
MOZ_TIMER_RESET(mTotalMimeTime);
|
||||
MOZ_TIMER_START(mTotalMimeTime);
|
||||
}
|
||||
|
||||
mozTXTToHTMLConv::~mozTXTToHTMLConv()
|
||||
{
|
||||
MOZ_TIMER_STOP(mTotalMimeTime);
|
||||
MOZ_TIMER_DEBUGLOG(("MIME Total Processing Time: "));
|
||||
MOZ_TIMER_PRINT(mTotalMimeTime);
|
||||
|
||||
MOZ_TIMER_DEBUGLOG(("mozTXTToHTMLConv::ScanTXT(): "));
|
||||
MOZ_TIMER_PRINT(mScanTXTTimer);
|
||||
|
||||
MOZ_TIMER_DEBUGLOG(("mozTXTToHTMLConv::GlyphHit(): "));
|
||||
MOZ_TIMER_PRINT(mGlyphHitTimer);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(mozTXTToHTMLConv, mozITXTToHTMLConv)
|
||||
@ -1106,8 +1084,6 @@ mozTXTToHTMLConv::ScanTXT(const PRUnichar * aInString, PRInt32 aInStringLength,
|
||||
PRBool doGlyphSubstitution = whattodo & kGlyphSubstitution;
|
||||
PRBool doStructPhrase = whattodo & kStructPhrase;
|
||||
|
||||
MOZ_TIMER_START(mScanTXTTimer);
|
||||
|
||||
PRUint32 structPhrase_strong = 0; // Number of currently open tags
|
||||
PRUint32 structPhrase_underline = 0;
|
||||
PRUint32 structPhrase_italic = 0;
|
||||
@ -1226,8 +1202,6 @@ mozTXTToHTMLConv::ScanTXT(const PRUnichar * aInString, PRInt32 aInStringLength,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_TIMER_STOP(mScanTXTTimer);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -58,7 +58,6 @@
|
||||
#include "mozITXTToHTMLConv.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTimer.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
|
||||
@ -95,12 +94,6 @@ public:
|
||||
PRInt32 CiteLevelTXT(const PRUnichar * line,PRUint32& logLineStart);
|
||||
|
||||
|
||||
// Timing!
|
||||
MOZ_TIMER_DECLARE(mScanTXTTimer)
|
||||
MOZ_TIMER_DECLARE(mGlyphHitTimer)
|
||||
MOZ_TIMER_DECLARE(mTotalMimeTime)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
protected:
|
||||
//////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user