Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Affiliate Program
Hosting Plans
UBBDev.com
UBBSkins.com
Who's Online
4 registered (Allen2010, David Dreezer, Iann128, johnmorrison1823), 37 Guests and 67 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
EMG
EMG
Registered: 10/30/08
Posts: 14
Top Posters (30 Days)
Rick 117
Ruben 99
Sirdude 77
Gizmo 63
Iann128 32
driv 22
teamzr1 20
GregK 20
Chevy454 19
David Dreezer 17
Latest Photos
rss creator
surfing dogs
Secret Falls, Belize
testing gallery
Ultima Online
Page 4 of 4 < 1 2 3 4
Topic Options
Rate This Topic
#188762 - 06/25/07 11:28 PM Re: Syntax highlighting [Re: Sirdude]
Gizmo Offline

Registered: 06/05/06
Posts: 13933
Loc: Portland, OR; USA ***
.... ok, so i do like the line numeration and ability to specify your own colors... :cracks:

However, I do NOT like this (off of their wiki):
 Quote:
Performance
SyntaxHighlighter uses regular expressions to parse the text. It's not extremely fast, in fact, it's pretty slow. If you are trying to highlight a few dozens lines of code, you won't see any problems. Trying to highlight 10kb worth of text will result in JavaScript being aborted because of long execution time.
_________________________
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic
UBB Modifications, Styling, Coding Services, and more!
Top
Host With Us!
#188765 - 06/25/07 11:36 PM Re: Syntax highlighting [Re: Gizmo]
ntdoc Offline
Registered: 11/08/06
Posts: 3374 ***
No like that, we post a LOT of code.
Top
#188766 - 06/25/07 11:37 PM Re: Syntax highlighting [Re: Gizmo]
Sirdude Offline
Registered: 04/19/07
Posts: 3111
Loc: SoCal, USA ****
hehe, i think it would be quite easy to limit the size of the data being parsed per post. so that would save the javascript abort.

and in normal use (at least in the threads forums where i already use it), people don't paste more than a page or two of code at a time, which the .js code (from what i see) handles in chunks between pre's or textareas. so the fear of having a long thread with 2 pages each per post breaking it probably isn't totally scary.

matter of fact i just tried it on my test forum with 20 large copy/pastes of differing code types in one thread and it handles it, albeit perceptibly slowly (1-2 seconds to finally hump through all 20 posts) and also, that 2 seconds was ALL (huge percent) client time. imagine the server (php) having to do the same and serving it up to 100 users at a whack! ;\)

but i will grant you that it might be slow on huge stuff.

i'm glad you read his wiki and found that out. it's good info to take into account, when evaluating ;\)

ps: on a side note, i wonder if he has a brother with 1st name Michail (gorbachev) \:D
_________________________

Threads tutorials . Threads & Wordpress experts
Top
#188767 - 06/26/07 12:00 AM Re: Syntax highlighting [Re: Sirdude]
Gizmo Offline

Registered: 06/05/06
Posts: 13933
Loc: Portland, OR; USA ***
See, that javascript abort is the problem... for coding communities, people post WELL MORE than 10k per thread... Think, it's not just PER POST, it's per page...

Then you bring it to say "view all posts in this thread", posting numersous lines of code... you're aborting all code highlighting...

Ahh, whats that I hear, oh yes, me finding another reason why to handle things that CAN be done server-side being done server site :flex:
_________________________
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic
UBB Modifications, Styling, Coding Services, and more!
Top
#188768 - 06/26/07 12:01 AM Re: Syntax highlighting [Re: Gizmo]
Gizmo Offline

Registered: 06/05/06
Posts: 13933
Loc: Portland, OR; USA ***
PS, i'd rather be referanced as stalin than gorbichav...
_________________________
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic
UBB Modifications, Styling, Coding Services, and more!
Top
#188769 - 06/26/07 12:06 AM Re: Syntax highlighting [Re: Gizmo]
Sirdude Offline
Registered: 04/19/07
Posts: 3111
Loc: SoCal, USA ****
i was talking about the author: Alex Gorbachev ;\)

you are simply the Giz
_________________________

Threads tutorials . Threads & Wordpress experts
Top
#188770 - 06/26/07 01:09 AM Re: Syntax highlighting [Re: Sirdude]
Yarp™ Offline
Registered: 08/30/06
Posts: 1451
Loc: Breda, NL ****
 Originally Posted By: Sirdude
Currently we have the "< php >" tags and the highlighting is generated 'server side'.


I don't see this as a big problem, since the syntax highlighting just needs to be done once when putting the message in the database.
_________________________
Top
#188772 - 06/26/07 01:26 AM Re: Syntax highlighting [Re: Gizmo]
Ian Spence Offline
Registered: 06/04/06
Posts: 255
 Originally Posted By: Gizmo
See, that javascript abort is the problem... for coding communities, people post WELL MORE than 10k per thread... Think, it's not just PER POST, it's per page...

Then you bring it to say "view all posts in this thread", posting numersous lines of code... you're aborting all code highlighting...

Ahh, whats that I hear, oh yes, me finding another reason why to handle things that CAN be done server-side being done server site :flex:


The problem is that server's have execution times as well. If the php script times out, the post never gets made. If the javascript times out, you get unhighlighted text.

Honestly, I think there should be a button similar to the spoiler button that does the highlighting at request instead of by default.
Top
#188773 - 06/26/07 02:38 AM Re: Syntax highlighting [Re: Ian Spence]
Gizmo Offline

Registered: 06/05/06
Posts: 13933
Loc: Portland, OR; USA ***
Now theres a sugguestion I can get behind, code tag spoilers with on-demand highlighting...
_________________________
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic
UBB Modifications, Styling, Coding Services, and more!
Top
Page 4 of 4 < 1 2 3 4



Moderator:  AllenAyres, Gizmo, Harold, Ian, Ron M, Sirdude 
Shout Box

Facebook Page
Today's Birthdays
No Birthdays
Recent Topics
Upgrade issues in version 7.5.6 (from 7.2.2)
by lcantey
Yesterday at 08:36 PM
deleting your own thread/subject
by VaGunTrader
Yesterday at 05:58 PM
changing the time.
by VaGunTrader
Yesterday at 05:27 PM
question
by Allen2010
Yesterday at 10:03 AM
Search for countries of users?
by tee
09/01/10 04:56 PM
Forum Stats
7909 Members
37 Forums
32927 Topics
173682 Posts

Max Online: 978 @ 06/24/07 10:19 PM
Random Image