RWS Community
RWS Community
  • Site

Trados Go

Trados Studio

Trados Ignite

Trados Team

Trados Accelerate

Trados Enterprise

Trados GroupShare

Passolo

MultiTerm

RWS AppStore

Connectors

Beta Groups

Managed Translation

MultiTrans

TMS

Trados Enterprise

WorldServer

Language Weaver

Language Weaver Edge

Language Weaver Connectors

Language Weaver in Trados Studio

 

 

Content Champions

Tridion Docs

Tridion Sites

Contenta

LiveContent

XPP

Trados Go Ideas

Trados Studio Ideas

Trados Ignite Ideas

Trados GroupShare Ideas

Trados Team Ideas

Trados Team Terminology Ideas

Trados Enterprise & Accelerate Ideas

MultiTerm Ideas

Passolo Ideas

RWS Appstore Ideas

Tridion Docs Ideas

Tridion Sites Ideas

Language Weaver Ideas

Language Weaver Edge Ideas

Managed Translation - Enterprise Ideas

TMS Ideas

WorldServer Ideas

Trados Enterprise Ideas

XPP Ideas

GroupShare Developers

Language Cloud Developers

MultiTerm Developers

Passolo Developers

Trados Studio Developers

Managed Translation Developers

TMS Developers

WorldServer Developers

Tridion Docs Developers

XPP Developers

Language Combinations by Language Services

RWS Training & Certification

Style Guides

Content Management Partners

LDE Korean Vendor Support

RWS Campus

Trados Approved Trainers

Nordic Tridion Docs User Group

Tridion West Coast User Group

Community Ops

RWS Community Internal Group

AURORA

Internal Trados Ideas

Linguistic Validation

Mercury

QA Tools

RI Operational Excellence

Trados Inspired

XPP Cloud

Recognition & Reward System

RWS Community Platform Related Questions

Community Solutions Hub (Trados)

About RWS

Events

RWS Services: Train AI & others

RWS Training & Certification

To RWS Support

  • Search
  • Translate

    Detecting language please wait for.......


    Powered by
  • User
  • Site
  • Search
  • User
  • Products
  • Language Weaver Solutions
  • Language Weaver
  • More
  • Cancel
Language Weaver
  • Products
  • Language Weaver Solutions
  • Language Weaver
  • More
  • Cancel

Language Weaver > Wiki

Optimize integration for speed
  • Home
  • Blogs
  • Leaderboard
  • Forum
  • Videos
  • Wiki
  • Docs
  • More
  • Cancel
  • New
Show Translation Options

Detecting language please wait for.......


Powered by
Language Weaver requires membership for participation - click to join
  • -Wiki
    • Dictionaries and Brands overview
    • -REST API
      • Refresh authentication token
      • Synchronous translation
      • Optimize integration for speed
  • Connect with Language Weaver Resources
  • Connecting Power BI to Language Weaver
  • How to report MT linguistic issues to RWS Support
  • How to use translation "Labels" in Language Weaver
  • How to use User Groups in Language Weaver
  • Language Weaver introduces Multilingual Content Insights
  • Real-time adaptation available in Language Weaver Translation UI
  • +End of Support Notices

You are currently reviewing an older revision of this page.

  • History View current version

Optimize integration for speed

Use Keep-Alive

One of the most simple thing that you can do to improve your workflow with SDL Machine Translation Cloud is to use Keep-Alive in your calls.  

"HTTP keep-alive, a.k.a., HTTP persistent connection, is an instruction that allows a single TCP connection to remain open for multiple HTTP requests/responses."1 - Imperva

Want to quantify how this can actually help your integration?  Try the following.

  1. Create a new file called "connection-test.txt" and paste in this:
        time_namelookup:  %{time_namelookup}\n
           time_connect:  %{time_connect}\n
        time_appconnect:  %{time_appconnect}\n
       time_pretransfer:  %{time_pretransfer}\n
          time_redirect:  %{time_redirect}\n
     time_starttransfer:  %{time_starttransfer}\n
                        ----------\n
             time_total:  %{time_total}\n
  2. Make a request to SDL MT Cloud REST API server (update the request sample below with your own credentials)
    curl -w "@connection-test.txt" -XPOST -H "Content-type: application/json" \
    -d '{"clientId": "F0ZUe28HFE8eaMLRLGJrIK0M6WGI9Nu", "clientSecret": "HFE8etNdtUP1liTrIKCtvlbGZ8Bv6Sxb-TAO_etNdHEcbWGu0KPGkVIu4QjiNEBt"}' \
    "
    https://translate-api.sdlbeglobal.com/v4/token"
  3. Repeat step 2

  4.  Because curl has keep-alive on as a default, you can compare the "time_connect" between the response for #2 and #3.  The difference between these two values is approximately the time your program will save by making requests with keep-alive option enabled.

While at first glance, the time save may seem very minimal, but it is significant for any integrations that do many translation requests and polls per minute.

Store and reuse authentication tokens

All requests to the SDL MT Cloud REST API requires a valid authentication token.  We recommend to request a token once and store it, then only request a new one when the token expires. This way you will get the best performance possible, as your application will not make an extra request for every translation call (this extra request will add up after a while if the application has high translation needs).

1 https://www.imperva.com/learn/performance/http-keep-alive/ 

  • Our Terms of Use
  • Copyright
  • Privacy
  • Security
  • Anti-slavery Statement
  • Cookie Notice
  • YouTube