Skip to content

Problems about the Search Text highlight (memory consumption, style) #465

Open
@MasterInQuestion

Description

@MasterInQuestion

    What's the exact implementation of Search Text?
    Does it excessively utilize "const" alike (or bad variable management)?
    Which seems to unnecessarily consume lots of memory.

    Also a new highlighting scheme for reference:
    https://github.com/MasterInQuestion/attach/raw/main/liriliri/eruda/465/Art.webp
    ; that shall address the inefficiency of current.
    .
    Source:
[[

<meta charset="UTF-8" />
<style>
	pre { margin: 0; padding: 0.8em 0.4em; }
	q { quotes: none; border: 1px solid rgba( 255, 0, 255, 0.25 );
	background-color: #FF0; color: #00F; }
</style>
<pre style="background-color: #FFF; color: #000"
	>Art <q>véritable</q> est indépendant de <q>la</q> forme.</pre>
<pre style="background-color: #7f7f7f; color: #FFF"
	>Art <q>véritable</q> est indépendant de <q>la</q> forme.</pre>
<pre style="background-color: #000; color: #FFF"
	>Art <q>véritable</q> est indépendant de <q>la</q> forme.</pre>
<pre style="background-color: #FF0; color: #000"
	>Art <q>véritable</q> est indépendant de <q>la</q> forme.</pre>
<pre style="background-color: #FF0; color: #00F"
	>Art <q>véritable</q> est indépendant de <q>la</q> forme.</pre>

]]
    "rgba( 255, 0, 255, 0.25 )" seems equivalent of "#ffbf40" in this case.
    ("background-color" fuses into "border"..?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions