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

  • Home
  • SEARCH
  • 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 5996781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:10:23+00:00 2026-05-23T00:10:23+00:00

I am writing a custom apache log parser for my company and I noticed

  • 0

I am writing a custom apache log parser for my company and I noticed a performance issue that I can’t explain. I have a text file log.txt with size 1.2GB.

The command: sort log.txt is up to 3 sec slower than the command: cat log.txt | sort

Does anybody know why this is happening?

  • 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-23T00:10:23+00:00Added an answer on May 23, 2026 at 12:10 am

    cat file | sort is a Useless Use of Cat.

    The purpose of cat is to concatenate
    (or “catenate”) files. If it’s only
    one file, concatenating it with
    nothing at all is a waste of time, and
    costs you a process.

    It shouldn’t take longer. Are you sure your timings are right?

    Please post the output of:

    time sort file
    

    and

    time cat file | sort
    

    You need to run the commands a few times and get the average.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When writing a custom channel how can I get the name of the service
I'm writing a custom file selection component. In my UI, first the user clicks
I'm writing a custom blog engine and would like to have trackbacks similar to
I'm writing a custom validator that checks that at least one field has a
I'm aware of writing custom attributes that decorate a method and get evaluated before
I'm new to writing custom ASP.NET server controls, and I'm encountering the following issue:
Some thoughts about writing custom html helpers. In our project everywhere you can find
I need help writing custom functions for my casio fx-9860g I have done this
I know I can do this by writing custom type descriptors etc., however given
I'm writing a RESTful webservice that returns custom/existing HTTP headers on successful/unsuccessful operations. For

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.