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 6893271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:38:17+00:00 2026-05-27T06:38:17+00:00

Jsoup is a very convenient tool to parse html and used as a basic

  • 0

Jsoup is a very convenient tool to parse html and used as a basic util in our crawler project. But recently I found our crawler was always doing full GC sometimes.

After dumping the object by jmap, I’m amazing to find that there are too many ParseError object. By reading source code, it’s not a exception, but an object. When a html has some problem, it will be likely to cause a lot of errors. So it should be under control to prevent create object crazily.

Some detail information as follows, hope it will help you to find the solution.

   java.lang.Thread.State: RUNNABLE
        at org.jsoup.parser.Tokeniser.error(Tokeniser.java:211)
        at org.jsoup.parser.TokeniserState$47.read(TokeniserState.java:1170)
        at org.jsoup.parser.Tokeniser.read(Tokeniser.java:42)
        at org.jsoup.parser.TreeBuilder.runParser(TreeBuilder.java:101)
        at org.jsoup.parser.TreeBuilder.parse(TreeBuilder.java:53)
        at org.jsoup.parser.Parser.parse(Parser.java:24)
        at org.jsoup.Jsoup.parse(Jsoup.java:44)

 num     #instances         #bytes  class name
----------------------------------------------
   1:      30110820     1204432800  org.jsoup.parser.ParseError
   2:         33076      156025088  [Ljava.lang.Object;
   3:         68836       98796360  [C
   4:         65808        9778264  <constMethodKlass>
   5:         65808        8959520  <methodKlass>
   6:         12044        8524088  [B
   7:          6424        7447912  <constantPoolKlass>
   8:        102203        5494560  <symbolKlass>
   9:          6424        4909064  <instanceKlassKlass>
  10:          5271        4171032  <constantPoolCacheKlass>
  11:        105257        3368224  java.lang.String
  • 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-27T06:38:17+00:00Added an answer on May 27, 2026 at 6:38 am

    @BalusC thanks for your hint!

    After reading source code carefully, I find the trackErrors is open and no API to set it false, even more, trackErrors is useless.
    I fix this and republish the package, but I’m still strange about this, is it a mistake?

    code1:
        private boolean trackErrors = true;
    
    code2:
        void error(TokeniserState state) {
            if (trackErrors)
                errors.add(new ParseError("Unexpected character in input", reader.current(), state, reader.pos()));
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use jsoup-1.6.0,parse html tag string, that only include string content 0, but jsoup
Very basic, But I don't know, How to add JSoup.jar to my android workspace?
I am using a HTML parser called Jsoup, to load and parse HTML files.
Jsoup has 2 html parse() methods: parse(String html) - As no base URI is
Searching SO and Google, I've found that there are a few Java HTML parsers
I am using JSOUP (java tool for XML files) and I am using following
I'm using jsoup to scrape some HTML data and it's working out great. Now
I am using Jsoup in my application and I am attempting to parse information
Having a very basic problem here building/running a Java skeleton to make use of
I am trying to pick, using Jsoup, the paragraph inside the following HTML snippet:

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.