Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7703325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:25:55+00:00 2026-05-31T23:25:55+00:00

If I want to parse a text field in SSJS there are 2 main

  • 0

If I want to parse a text field in SSJS there are 2 main tools. The built in JavaScript code and the newly converted @Functions. Are the @Functions slower then using pure javascript? Or is there no real difference?

viewScope.put("length", tmpStr.length)

vs.

viewScope.put("length:, @Length(tmpStr))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:25:57+00:00Added an answer on May 31, 2026 at 11:25 pm

    For me it seems that the @Formula is not as fast as using SSJS-code.

    You can easily test by yourself with some code like this one (reload page multiple times to get serious results):

    <?xml version="1.0" encoding="UTF-8"?>
    <xp:view xmlns:xp="http://www.ibm.com/xsp/core">
        <xp:label id="label1">
            <xp:this.value>
                <![CDATA[#{javascript:
                var start = java.lang.System.currentTimeMillis();
                var testString = "0123456789";
                var dummy;
                for(  var i=0;  i<100000; i++ ){
                dummy = @Length( testString )
                }
                var stop = java.lang.System.currentTimeMillis();
                stop - start + " ms"}]]>
            </xp:this.value>
        </xp:label>
        <xp:br></xp:br>
        <xp:br></xp:br>
        <xp:label id="label2">
            <xp:this.value>
                <![CDATA[#{javascript:
                var start = java.lang.System.currentTimeMillis();
                var testString = "0123456789";
                var dummy;
                for( var i=0;  i<100000; i++ ){
                dummy = testString.length;
                }
                var stop = java.lang.System.currentTimeMillis();
                stop - start + " ms"}]]>
            </xp:this.value>
        </xp:label>
    </xp:view>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to parse the html file, pdf file, csv file and text file.Now
Is it possible to parse the enetered text in the textinput,i want to find
This is the source text I want to parse: 1 From fairest creatures we
Original I want to parse a string of html code and add newlines after
Is there a default/official/recommended way to parse CSV files in C#? I don't want
I want to clean up some parsed text such as \n the said \r\n\r\n\r\n
I've made a little forum and I want parse the date on newest posts
I want to parse a config file sorta thing, like so: [KEY:Value] [SUBKEY:SubValue] Now
I want to parse some HTML in order to find the values of some
I want to parse a web page in Groovy and extract all of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.