8223658: Performance regression of XML.validation in 13-b19

Reviewed-by: lancea
This commit is contained in:
Joe Wang 2019-05-24 10:28:21 -07:00
parent dd386b9acb
commit 50eb86d003

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
*/ */
/* /*
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
@ -42,7 +42,7 @@ import org.w3c.dom.Node;
* @xerces.internal * @xerces.internal
* *
* @since PR-DOM-Level-1-19980818. * @since PR-DOM-Level-1-19980818.
* @LastModified: Oct 2017 * @LastModified: May 2019
*/ */
public class DeferredDocumentImpl public class DeferredDocumentImpl
extends DocumentImpl extends DocumentImpl
@ -69,7 +69,7 @@ public class DeferredDocumentImpl
// protected // protected
/** Chunk shift. */ /** Chunk shift. */
protected static final int CHUNK_SHIFT = 11; // 2^11 = 2k protected static final int CHUNK_SHIFT = 8; // 2^8 = 256
/** Chunk size. */ /** Chunk size. */
protected static final int CHUNK_SIZE = (1 << CHUNK_SHIFT); protected static final int CHUNK_SIZE = (1 << CHUNK_SHIFT);
@ -78,7 +78,7 @@ public class DeferredDocumentImpl
protected static final int CHUNK_MASK = CHUNK_SIZE - 1; protected static final int CHUNK_MASK = CHUNK_SIZE - 1;
/** Initial chunk size. */ /** Initial chunk size. */
protected static final int INITIAL_CHUNK_COUNT = (1 << (16 - CHUNK_SHIFT)); // 2^16 = 64k protected static final int INITIAL_CHUNK_COUNT = (1 << (13 - CHUNK_SHIFT)); // 32
// //
// Data // Data